openMVS代码逐行解析
一、openMVS安装运行
1、按照官网编译源码
官方代码:GitHub地址
#我使用的是mac,这里贴出的是mac安装配置详情,其他环境参考官网
#Install dependencies
brew update
brew install boost eigen opencv cgal
main_path=`pwd`
#GLFW3 (Optional)
brew install glew glfw3
#VCGLib (Required)
git clone https://github.com/cdcseacave/VCG.git vcglib
#Getting the OpenMVS sources:
git clone https://github.com/cdcseacave/openMVS.git
#Build OpenMVS
mkdir openMVS_build && cd openMVS_build
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib"
#Alternatively, build using XCode
cmake . ../openMVS -G "Xcode" -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib"
xcodebuild -configuration Release
#If you want to use OpenMVS as shared library, add to the CMake command:
-DBUILD_SHARED_LIBS=ON
#Install OpenMVS library (optional):
make && sudo make install
2、运行demo
./bin/DensifyPointCloud -w /Users/sunxiaofei/PycharmProjects/OpenMVS/openMVS_sample -i scene.mvs -o test_dense.mvs