参考:
https://zhuanlan.zhihu.com/p/85105925
https://blog.csdn.net/u012512679/article/details/53116641
官方安装步骤:
https://github.com/openMVG/openMVG/blob/master/BUILD.md#linux
1.下载下面的文件:
1.https://github.com/openMVG/openMVG
2.https://github.com/openMVG-thirdparty/cereal
3.https://github.com/openMVG-thirdparty/osi_clp
4.https://github.com/elmindreda/glfw
为什么要准备2 3 4,因为我使用下面的命令来下载openMVG时,会下载不成功,这些子包下载不下来,于是自己下载,然后放到指定位置:
git clone --recursive https://github.com/openMVG/openMVG.git
2.下载完后,把下载的子模块glfw 、osi_clp、cereal放置在openMVG下的/src/dependencies对应的文件夹中;
3.安装官方的安装步骤进行:https://github.com/openMVG/openMVG/blob/master/BUILD.md#linux
Compiling on Linux
- Install the required external libraries.
$ sudo apt-get install libpng-dev libjpeg-dev libtiff-dev libxxf86vm1 libxxf86vm-dev libxi-dev libxrandr-dev
If you want see the view graph svg logs, install Graphviz.
$ sudo apt-get install graphviz
- Checkout OpenMVG.
git clone --recursive https://github.com/openMVG/openMVG.git
mkdir openMVG_Build && cd openMVG_Build
- Configure and build
cmake -DCMAKE_BUILD_TYPE=RELEASE ../openMVG/src/
cmake --build . --target install
Run tests using make or ctest (if requested in the CMake command line with -DOpenMVG_BUILD_TESTS=ON)
make test
ctest --output-on-failure -j
- 按照官网命令可能会出现如下问题:
[100%] Linking CXX executable ../../Linux-x86_64-RELEASE/openMVG_main_openMVG2WebGL
[100%] Built target openMVG_main_openMVG2WebGL
Install the project...
-- Install configuration: "RELEASE"
-- Up