按照下面的步骤进行即可:
https://blog.csdn.net/weixin_56566649/article/details/124355140?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168247525816800226555600%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=168247525816800226555600&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_positive~default-1-124355140-null-null.142^v86^insert_down1,239^v2^insert_chatgpt&utm_term=ubuntu20.04%E9%85%8D%E7%BD%AEorbslam2&spm=1018.2226.3001.4187
教程可以使用其中有一些注意事项:
安装cmake gcc g++ git使用命令安装即可
安装Pangolin时,这个教程下Pangolin的安装包是rar格式需要下载解压软件安装命令如下:
sudo apt-get install rar
sudo apt-get install unrar
接下来按照教程的步骤安装Pangolin
最重要:一定要测试以下是否安装成功再进行接下来的安装
安装Eigen3
sudo apt-get install libeigen3-dev
后面运行:sudo updatedb时会报错:"找不到updatedb命令"
需要安装molocate包:sudo apt-get install mlocate
安装Opencv3.4.15
提取压缩包的内容到主目录,并将文件重命名为Opencv3
打开终端依次完成下列命令
sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev-is-python2 python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
这里与教程按照上面的命令行执行就行(新版本ubuntu python开发包命名为python-dev-is-python2)
cd opencv3
mkdir build
cd build
cmake ..
在编译过程中会因为网络问题卡在:IPPICV:DownLoad:ippicv_2020_lnx_intel64_20191018_general.tgz,修改配置文件教程如下
https://blog.csdn.net/qq_43478260/article/details/109458079?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168247879316800222892652%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=168247879316800222892652&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_positive~default-1-109458079-null-null.142^v86^insert_down1,239^v2^insert_chatgpt&utm_term=IPPICV%3A%20Download%3A%20ippicv_2020_lnx_intel64_20191018_general.tgz&spm=1018.2226.3001.4187
最后的camke是在ippicv文件中进行cmake
make
教程中make - j 会发生程序崩溃所以使用make
sudo make install
打开新终端
sudo gedit /etc/ld.so.conf.d/opencv.conf
添加/usr/local/lib,这里会报warning但是可以不用去管
最后:去测试Opencv是否安装成功
去百度网盘下载数据集,跑通即可