Ubuntu20.04安装openMVS<成功>.colmap<成功>和openMVG<失败(已成功)>
一、安装openMVS
参考官方文档
sudo apt-get -y install git mercurial cmake libpng-dev libjpeg-dev libtiff-dev libglu1-mesa-dev
eigen
git clone https://gitlab.com/libeigen/eigen --branch 3.4
mkdir eigen_build
cd eigen_build &&\
cmake . ../eigen -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda/ &&\
make && sudo make install &&\
cd ..
查看版本
pkg-config --modversion eigen3
Boost
sudo apt-get -y install libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-serialization-dev
OpenCV
sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq libopencv-dev
CGAL
sudo apt-get -y install libcgal-dev libcgal-qt5-dev
VCGLib
git clone https://github.com/cdcseacave/VCG.git vcglib
openMVS
git clone --recursive https://github.com/openMVG/openMVG.git
编译
mkdir openMVS_build
cd openMVS_build &&\
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT=../vcglib -DOpenMVS_USE_CUDA=ON -DCMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs/ -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda/ -DCUDA_INCLUDE_DIRS=/usr/local/cuda/include/ -DCUDA_CUDART_LIBRARY=/usr/local/cuda/lib64 -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda/bin/
安装
make -j4 &&\
sudo make install
二.安装colmap
apt更新
sudo apt update && sudo apt-get upgrade
安装依赖
sudo apt-get install git cmake ninja-build build-essential libboost-program-options-dev libboost-filesystem-dev libboost-graph-dev libboost-system-dev libeigen3-dev libflann-dev libfreeimage-dev libmetis-dev libgoogle-glog-dev libgtest-dev libsqlite3-dev libglew-dev qtbase5-dev libqt5opengl5-dev libcgal-dev libceres-dev
安装colmap
sudo apt-get install git cmake ninja-build build-essential libboost-program-options-dev libboost-filesystem-dev libboost-graph-dev libboost-system-dev libeigen3-dev libflann-dev libfreeimage-dev libmetis-dev libgoogle-glog-dev libgtest-dev libsqlite3-dev libglew-dev qtbase5-dev libqt5opengl5-dev libcgal-dev libceres-dev
测试是否安装成功
colmap gui
OK~~
三.安装openMVG
官方文档:https://github.com/openMVG/openMVG/blob/master/BUILD.md#linux
安装所需要的外部库
sudo apt-get install libpng-dev libjpeg-dev libtiff-dev libxxf86vm1 libxxf86vm-dev libxi-dev libxrandr-dev
若要查看视图图形 svg 日志,安装 Graphviz:
sudo apt-get install graphviz
cd到路径
git clone --recursive https://github.com/openMVG/openMVG.git
mkdir openMVG_Build && cd openMVG_Build
cmake -DCMAKE_BUILD_TYPE=RELEASE ../openMVG/src/
cmake --build . --target install
但我运行上面这个指令一直卡住,没有cmake成功
更换以下指令
cmake -DCMAKE_BUILD_TYPE=RELEASE \
-DOpenMVG_BUILD_TESTS=ON \
-DOpenMVG_BUILD_EXAMPLES=OFF \
../openMVG/src; \
make -j 4;
在44%时报错
安装
sudo make install
尝试ing:
1//可能ubuntu20的资源库缺少python-minimal和liblemon-dev,将python-minimal换成python2-minimal,而liblemon-dev采用手动安装。
Ubuntu – 软件包下载地址选集 -- lemon_3.31.1-4ubuntu0.6_amd64.deb
sudo dpkg -i lemon_3.31.1-4ubuntu0.6_amd64.deb
无效
还没排出错。。。。。。/
尝试了N次,查看了很多博文,步骤就是这些步骤,也根据官方文件步骤试过了,都不行(aaa)。。。。
参考博文:
Ubuntu20.04安装三维重建的openMVG、openMVS和colmap环境_colmap openmvs openmvg-CSDN博客
ubuntu20.04 colmap 安装2024.11最新_ubuntu20.04安装colmap-CSDN博客
虚拟机ubuntu16.04 编译openmvg和openmvs 详细过程_file install cannot make directory-CSDN博客
终于!!装好啦!!
不知道为什么,上面安装OpenMVS时用的eigen是3.4.1,没问题,但是后面装OpenMVG就一直报错,后面又找了一下,把eigen库重装了一下,装的3.4.0,终于装好了(doge