Windows 安装注意事项:
问题1:
openMVG 默认使用的Eigen 是安装在C盘,因此需要管理员权限下打开VS 编译;或许可以把openMVG默认使用的Eigen设置为我们D盘自己安装的Eigen,这个还没有试。
问题2:
openMVG : debug版生成的库,和release 版生成的库 ,库名都一样。
因此: 如果先编译Debug 版,后编译Release, release版的库会覆盖Debug库; 反之,类似;
因此,自己工程是Release 版时,要链接Release 版的openMVG, 是Debug 版时,要链接Debug 版的openMVG。
即使给openMVG Debug生成的库名后加d,然后生成release版,自己的工程再生成Debug 版时,链接依然mismatch,release版编译成功。
根据:https://github.com/openMVG/openMVG/issues/905 的意思是,需要建两个build,两个install,还没试。
Ubuntu 安装注意事项:
1. 由于OpenMVG 使用了大量的third_party ,避免后面的版本库之间的匹配, github 上作者推荐安装到自己的一个指定地方,避免默认的"/usr/local" 安装位置
2. 编译成静态库形式
3. 由于Eigen的bug,安装时, 会把自带的Eigen 安装到 /usr/local/include/openMVG/third_party/eigen 下, 所以需要时需要sudo 权限,或者自己改 openMVG/src/third_party/eigen/CMakeLists.txt (之前按照github上一篇帖子没改成功,TODO)
4. 使用自带的Ceres,不要使用之前自己安装的/usr/local/ 下的ceres, 修改方法:
openMVG/src/CMakeLists.txt 中 line:270 ,屏蔽找外部的Ceres
# find_package(Ceres QUIET HINTS ${CERES_DIR_HINTS}) jxl: comment this to use internal ceres
否则后面在执行一些samples 和tools时,遇到类似这样的错误:
*** Error in `./openMVG_main_IncrementalSfM': double free or corruption (out): 0x00007f3b80000ae0 ***
已放弃 (核心已转储)