openMVG编译

注意,请一定浏览完整个流程在开始你的编译

参考博客:

https://blog.csdn.net/qq_39615622/article/details/80967378

MVG:

https://github.com/openMVG/openMVG

文档:

https://openmvg.readthedocs.io/en/latest/


.\vcpkg.exe install cereal:x64-windows ceres:x64-windows eigen3:x64-windows libjpeg-turbo:x64-windows libpng:x64-windows tiff:x64-windows

openMVG编译_第1张图片

openMVG编译_第2张图片

Note: If you want to use ceres with a sparse back end, please use one of this choice ceres[cxsparse] or ceres[suitesparse] or ceres[eigensparse].

 .\vcpkg.exe search ceres

openMVG编译_第3张图片

 这里我们安装的是默认版本的

没有安装优化版本

新建一个MVG文件夹

可以使用git命令

git clone --recursive https://github.com/openMVG/openMVG.git

 -n, 不检出Git库中的active branch
-o new_origin, 使用new_origin,而不使用默认的origin,作为跟踪分支的upstream所在库
-b new_branch, 设置本地的active branch,而非默认的master branch
--single-branch, 只检查一个branch,要么是默认的master,要么是-b new_branch指定的new_branch
--recursive, 在本地初始化Git库中的所有模块

但是这里我们建议使用develop版本

openMVG编译_第4张图片

记住自己下载的是什么时间点更新的版本,方便后面你或者别人可以重复这个博客进行编译

openMVG编译_第5张图片

下载好后解压,并且新建build文件夹 

 openMVG编译_第6张图片

cd openMVG_Build

openMVG编译_第7张图片

缺少子模块

我们通过:

git clone --recursive https://github.com/openMVG/openMVG.git

 下载master分支,然后拷贝子模块

openMVG编译_第8张图片

 openMVG编译_第9张图片

openMVG编译_第10张图片

打开G:\VS2017code\openMVG\openMVG\src\CMakeLists.txt  不编译Qt,因为我安装的qt是32位,肯定会出错

openMVG编译_第11张图片

编译成功了,现在我去尝试master是否能成功,如果master能成功,我们就不用开发版分支,用主分支

和上面一样,qt注释,不进行编译

打开G:\VS2017code\openMVG\openMVG\src\CMakeLists.txt  不编译Qt,因为我安装的qt是32位,肯定会出错

openMVG编译_第12张图片

使用命令: 

cmake . ..\openMVG\src\ -G "Visual Studio 15 2017 Win64" -DCMAKE_TOOLCHAIN_FILE=G:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows

openMVG编译_第13张图片

openMVG编译_第14张图片 上面是Debug-x64版本

接下来我们尝试Release-x64版本

openMVG编译_第15张图片


最后我们附上完整的MVG编译信息,看看我们注释了哪些库,没有配置哪些库

PS G:\VS2017code\openMVG\openMVG_master_Build> cmake . ..\openMVG\src\ -G "Visual Studio 15 2017 Win64" -DCMAKE_TOOLCHAIN_FILE=G:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.17134.
-- The C compiler identification is MSVC 19.16.27024.1
-- The CXX compiler identification is MSVC 19.16.27024.1
-- Check for working C compiler: G:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
-- Check for working C compiler: G:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: G:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
-- Check for working CXX compiler: G:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- target changed from "" to "auto"
-- Detected CPU: kaby-lake
-- Performing Test check_c_compiler_flag__arch_AVX2
-- Performing Test check_c_compiler_flag__arch_AVX2 - Success
-- Performing Test check_cxx_compiler_flag__arch_AVX2
-- Performing Test check_cxx_compiler_flag__arch_AVX2 - Success
-- Checking for C++11 compiler
-- Checking for C++11 compiler - available
-- Found OpenMP_C: -openmp (found version "2.0")
-- Found OpenMP_CXX: -openmp (found version "2.0")
-- Found OpenMP: TRUE (found version "2.0")
-- Found installed version of Eigen: G:/vcpkg/installed/x64-windows/share/eigen3
-- Found required Ceres dependency: Eigen version 3.3.5 in G:/vcpkg/installed/x64-windows/include/eigen3
-- Found required Ceres dependency: glog
-- Ceres version 1.14.0 detected here: G:/vcpkg/installed/x64-windows was built with C++11. Ceres target will add C++11 flags to compile options for targets using it.
-- Found Ceres version: 1.14.0 installed in: G:/vcpkg/installed/x64-windows with components: [SchurSpecializations, C++11, OpenMP, Multithreading]
-- Flann 1.8.4 found (include: G:/VS2017code/openMVG/openMVG/src/third_party/flann/src/cpp/flann)
-- CoinUtils 2.10.13 found (include: G:/VS2017code/openMVG/openMVG/src/dependencies/osi_clp/CoinUtils/src)
-- Clp 1.16.10 found (include: G:/VS2017code/openMVG/openMVG/src/dependencies/osi_clp/Clp/src)
-- Osi 0.107.8 found (include: G:/VS2017code/openMVG/openMVG/src/dependencies/osi_clp/Osi/src/Osi)
-- Lemon  found (include: G:/VS2017code/openMVG/openMVG/src/third_party/lemon/lemon)
-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)
-- Could NOT find Wget (missing: WGET_EXECUTABLE)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find Ghostscript (missing: GHOSTSCRIPT_EXECUTABLE)
-- Could NOT find COIN (missing: COIN_INCLUDE_DIR COIN_CBC_LIBRARY COIN_CBC_SOLVER_LIBRARY COIN_CGL_LIBRARY COIN_CLP_LIBRARY COIN_COIN_UTILS_LIBRARY COIN_OSI_LIBRARY COIN_OSI_CBC_LIBRARY COIN_OSI_CLP_LIBRARY)
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long long
-- Check size of long long - done
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE)
Sphinx need to be installed to generate the sphinx documentation
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Doxygen need to be installed to generate the doxygen documentation


** OpenMVG version: 1.4.0
** Build Shared libs: OFF
** Build OpenMVG tests: OFF
** Build OpenMVG softwares: ON
** Build OpenMVG GUI softwares:
** Build OpenMVG documentation: ON
** Build OpenMVG samples applications: ON
** Build OpenMVG openGL examples: OFF
** Enable code coverage generation: OFF
** Enable OpenMP parallelization: ON
** Build OpenCV+OpenMVG samples programs: OFF
** Use OpenCV SIFT features: OFF


-- CEREAL: (external)
-- EIGEN: 3.3.5 (external)
-- CERES: 1.14.0 (external)
-- FLANN: 1.8.4 (internal)
-- LIBTIFF: 4.0.10 (external)
-- LIBPNG: 1.6.35 (external)
-- LIBJPEG (external)
-- CLP: 1.16.10 (internal)
-- COINUTILS: 2.10.13 (internal)
-- OSI: 0.107.8 (internal)
-- LEMON: 1.3 (internal)


-- Configuring done
-- Generating done
-- Build files have been written to: G:/VS2017code/openMVG/openMVG_master_Build

 

你可能感兴趣的:(SLAM+SFM)