方便以后复现环境,记录如下:
$:sudo apt-get install cmake
$:cmake -version
>>3.10.2
$:sudo make update
$:make -v
>>GUN make 4.1
$:sudo apt-get install g++
$:sudo apt-get install vim
{进入目录>vim>i>输入内容>Esc>:>w [文件名]>enter>:>wq>enter>ls查看(流程助记)}
$:sudo apt-get install kdevelop
opencv3.4.4
$: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 python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev
libjasper-dev依赖项需要单独附加
$:sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
$:sudo apt update
$: sudo apt install libjasper1 libjasper-dev#其中libjasper1是libjasper-dev的依赖包
$:git clone https://github.com/opencv/opencv.git
(太慢,容易下载失败,可以选择去github下载sourse,用unzip解压:unzip opencv-3.4.4.zip)
$:cd opencv-3.4.4
$:mkdir build
$:cd build
$:cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
$:sudo make
$:sudo make install
参见https://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html
$:sudo apt-get install libeigrn3-dev
$:cd /usr/include/eigen3
$:sudo cp Eigen -r /usr/include
eigen3 ubuntu18.04中默认3.3
$:git clone https://github.com/strasdat/Sophus.git
$:cd Sophus
$:git checkout a621ff
$:mkdir build
$:cd build
$:cmake .. (警告,影响不大)
$:make(会报错,函数赋值有误,用vim修改sophus/so2.cpp :将A.()=1.相应改写为A.(1.),安装成功!)
(eigen3和sophus都需要复制文件到/usr/include目录下)
$:cd
$:cd Sophus
$:sudo cp sophus -r /usr/include