使用sfm模块问题构建opencv [英] building opencv with sfm module issues

查看:195
本文介绍了使用sfm模块问题构建opencv的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用已构建并安装了gflags,然后是glog和ceres-solver的sfm模块来构建opencv.但make日志显示:模块opencv_sfm已禁用,因为未找到以下依赖项:Glog/Gflags .即使在较早的几行中,它也说可以找到这些目录.

I am trying to build opencv with sfm modules I've built and installed gflags then glog and the ceres-solver. Yet the make logs says: Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags. Even though in earlier lines it says it finds both to these directories.

我也已经构建并安装了VTK,尽管由于某些原因,即使我手动选择构建目录也找不到它.

I've also built and installed VTK though for some reason it doesn't find it even when I manually select the build directory.

以下是我的CMake日志的相关部分:

VTK.请在CMake中将-DVTK_DIR设置为VTK构建目录,或使用VTKConfig.cmake文件将其设置为VTK安装子目录

OpenCV Python:在开发过程中附加到PYTHONPATH:C:/DEV/opencv-4.2.0/builds/python_loader

咖啡:不

Protobuf:不

Glog:是

freetype2:否

harfbuzz:不

由于未找到OGRE3D而禁用了模块opencv_ovis

没有使用导出的gflags CMake配置集的偏好,也没有提供包含/库目录的提示.默认情况下,首选安装/导出的gflags CMake配置.

找到已安装的gflags版本:C:/Program Files(x86)/gflags/lib/cmake/gflags

检测到的gflags版本:2.2.2

正在检查SFM部门...错误

模块opencv_sfm已禁用,因为未找到以下依赖项:Glog/Gflags

推荐答案

我设法使SFM模块最终得以编译.我并不能100%地解决它,但是我做了以下事情:我删除了gflags,glog和ceres-solver的所有版本.我下载了较早版本的ceres-solver(1.14)和VTK(8.2.0).早期版本可能与使用opencv4.2和python 3.7有关.

I managed to get the SFM module to compile finally. I am not 100% on what fixed it but here is what I did: I deleted all versions of gflags, glog, and ceres-solver. I downloaded a slightly older version of ceres-solver (1.14) and VTK (8.2.0). The earlier versions might be related to using opencv4.2 and python 3.7.

我将gflags和glog与eigen一起放置在ceres-solver文件夹中.然后使用CMake和Visual Studio 2019,我在调试和发布中构建并安装了gflags.glog(链接到gflags)仅在发行版中.最后,我构建并安装了链接到glog,gflags和本征的ceres-solver.遵循本教程: http://sylvain.duchene.im/how-to-build-ceres-under-windows/

I placed gflags and glog in the ceres-solver folder with eigen. Then using CMake and visual studio 2019 I built and installed gflags in debug and release. glog (linking to gflags) only in release. Finally, I built and installed ceres-solver linking to glog, gflags and eigen. Following this tutorial: http://sylvain.duchene.im/how-to-build-ceres-under-windows/

然后,当我使用CMake通过contribs库构建openCV4.2时,我发现了sfm模块和VTK.

Then when I used CMake to build openCV4.2 with the contribs libraries I found both the sfm module and VTK.

这篇关于使用sfm模块问题构建opencv的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆