所展示的欢迎页。如果你想学习如何使用Markdown编辑器, 可以仔细阅读这篇文章,了解一下Markdown的基本语法知识。
OpenMVS官方教程在这里
官网以Ubuntu 16.04为例,但我用的系统版本是18.04
OpenMVS依赖一些第三方开源库,在接下来的安装过程中可能会安装这些额外的依赖库,不过其中一些是必要的,一些是可选的:
以下为官方-Linux compilation原文:
#Prepare and empty machine for building:
sudo apt-get update -qq && sudo apt-get install -qq
sudo apt-get -y install git cmake libpng-dev libjpeg-dev libtiff-dev libglu1-mesa-dev
main_path=`pwd`
#Eigen (Required)
git clone https://gitlab.com/libeigen/eigen.git --branch 3.4
mkdir eigen_build && cd eigen_build
cmake . ../eigen
make && sudo make install
cd ..
#Boost (Required)
sudo apt-get -y install libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-serialization-dev
#OpenCV (Required)
sudo apt-get -y install libopencv-dev
#CGAL (Required)
sudo apt-get -y install libcgal-dev libcgal-qt5-dev
#VCGLib (Required)
git clone https://github.com/cdcseacave/VCG.git vcglib
#Ceres (Optional)
sudo apt-get -y install libatlas-base-dev libsuitesparse-dev
git clone https://ceres-solver.googlesource.com/ceres-solver ceres-solver
mkdir ceres_build && cd ceres_build
cmake . ../ceres-solver/ -DMINIGLOG=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
make -j2 && sudo make install
cd ..
#GLFW3 (Optional)
sudo apt-get -y install freeglut3-dev libglew-dev libglfw3-dev
#OpenMVS
git clone https://github.com/cdcseacave/openMVS.git openMVS
mkdir openMVS_build && cd openMVS_build
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib"
#If you want to use OpenMVS as shared library, add to the CMake command:
-DBUILD_SHARED_LIBS=ON
#Install OpenMVS library (optional):
make -j2 && sudo make install
参考链接:openMVS+ubuntu1804安装记录和问题解决_by fangjiaji007
#相关工具安装和升级
sudo apt-get update -qq && sudo apt-get install -qq
sudo apt-get -y install git cmake libpng-dev libjpeg-dev libtiff-dev libglu1-mesa-dev
#安装Eigen (必需)
git clone https://gitlab.com/libeigen/eigen.git --branch 3.2 #下载工程
mkdir eigen_build && cd eigen_build #创建编译安装位置并进入
cmake . …/eigen #使用cmake编译
make && sudo make install
cd …
#安装Boost (必需)
sudo apt-get -y install libboost-iostreams-dev libboost-program-options-dev
libboost-system-dev libboost-serialization-dev
#安装OpenCV (必需)
sudo apt-get -y install libopencv-dev #电脑上已经有opencv可以略过此步骤
#安装CGAL (必需)
sudo apt-get -y install libcgal-dev libcgal-qt5-dev
#安装VCGLib (必需)
git clone https://github.com/cdcseacave/VCG.git vcglib #这个下载比较慢,家里有条件的可以
#安装Ceres (可选)
sudo apt-get -y install libatlas-base-dev libsuitesparse-dev
git clone https://ceres-solver.googlesource.com/ceres-solver ceres-solver
mkdir ceres_build && cd ceres_build
cmake . …/ceres-solver/ -DMINIGLOG=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
make -j2 && sudo make install
cd …
#安装GLFW3 (可选)
sudo apt-get -y install freeglut3-dev libglew-dev libglfw3-dev
#安装OpenMVS
git clone https://github.com/electech6/openMVS_comments.git openMVS
mkdir openMVS_build && cd openMVS_build
cmake . …/openMVS -DCMAKE_BUILD_TYPE=Release -VCG_ROOT="/path to vcglib/vcglib"
#生成 OpenMVS 库文件:
sudo make -j2 && sudo make install
#安装完毕
————————————————
版权声明:本文为CSDN博主「fangjiaji007」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_35250841/article/details/115639760
在配置过程中很多地方需要使用git clone,但下载速度很慢,
解决办法
参考这篇文章git clone速度太慢的解决办法_by_Sivan2017
参考这篇文章Failed to receive SOCKS4 connect request ack 解决_by_way49864
运行git clone…的命令时报错:
Failed to receive SOCKS4 connect request ack.
问题来源
开启了 sockets5 网络代理,例如开了ssr或者蓝灯之类的(我也不太懂)
解决方法
git config --global http.proxy 'socks5://127.0.0.1:1080'
如果还没有解决你的问题,你可以试试这篇文章
官方教程中可以通过这个设置安装路径,但如果忽略这条代码,可能会在后续安装中出现问题,参考这篇文章Ubuntu使用OpenMVG和OpenMVS进行三维重建
Eigen必须是3.2.X版本,自己手动下载时,如果下载了高版本的,会编译出错。
先耐心等等,编译的过程中可能会出现静止的状况,多等一下就好了
[ 19%] Built target Common
[ 30%] Built target Math
[ 53%] Built target IO
[ 81%] Built target MVS
[ 84%] Linking CXX executable ../../bin/InterfaceVisualSFM
[ 84%] Linking CXX executable ../../bin/InterfaceCOLMAP
/usr/bin/ld: CMakeFiles/InterfaceVisualSFM.dir/InterfaceVisualSFM.cpp.o: undefined reference to symbol '_ZN2cv7imwriteERKNS_6StringERKNS_11_InputArrayERKSt6vectorIiSaIiEE'
//usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.3.2: 无法添加符号: DSO missing from command line
collect2: error: ld returned 1 exit status
/usr/bin/ld: CMakeFiles/InterfaceCOLMAP.dir/InterfaceCOLMAP.cpp.o: undefined reference to symbol '_ZN2cvmlERKNS_3MatES2_'
//usr/lib/x86_64-linux-gnu/libopencv_core.so.3.2: 无法添加符号: DSO missing from command line
collect2: error: ld returned 1 exit status
apps/InterfaceVisualSFM/CMakeFiles/InterfaceVisualSFM.dir/build.make:95: recipe for target 'bin/InterfaceVisualSFM' failed
make[2]: *** [bin/InterfaceVisualSFM] Error 1
CMakeFiles/Makefile2:658: recipe for target 'apps/InterfaceVisualSFM/CMakeFiles/InterfaceVisualSFM.dir/all' failed
make[1]: *** [apps/InterfaceVisualSFM/CMakeFiles/InterfaceVisualSFM.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
apps/InterfaceCOLMAP/CMakeFiles/InterfaceCOLMAP.dir/build.make:95: recipe for target 'bin/InterfaceCOLMAP' failed
make[2]: *** [bin/InterfaceCOLMAP] Error 1
CMakeFiles/Makefile2:603: recipe for target 'apps/InterfaceCOLMAP/CMakeFiles/InterfaceCOLMAP.dir/all' failed
make[1]: *** [apps/InterfaceCOLMAP/CMakeFiles/InterfaceCOLMAP.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
问题来源
在官方教程中,建立共享库时使用了以下代码,但这会在接下来的步骤中发生上述错误
#If you want to use OpenMVS as shared library, add to the CMake command:
-DBUILD_SHARED_LIBS=ON
解决方法
不要使用上述代码
如果已经使用了上述代码,可以通过以下代码改过来:
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib" -DBUILD_SHARED_LIBS=OFF
注意:代码中的"$main_path/vcglib"改成你的vcglib的安装路径
一般在:
/home/你的用户名/vcglib