为什么我只能在make install之后从opencv安装一些模块

时间:2016-02-29 01:08:14

标签: opencv

我正在安装带有额外模块的opencv 3.1.0,我需要安装sfm模块。我按照sfm包中的安装指南中的说明安装了所有先决条件,并从opencv_source_directory / release运行此命令:

cmake -DOPENCV_EXTRA_MODULES_PATH=~/git/opencv_contrib/modules ..

我可以成功创建make文件并安装。

但我在installation_path / include / opencv2 /

下找不到sfm.hpp

我错过了什么吗?谢谢!

我在CMake命令行输出中找到了这些:

-- Found required Ceres dependency: Eigen version 3.2.8 in /usr/local/include/eigen3
-- Found required Ceres dependency: Glog in /usr/include
-- Found Ceres version: 1.12.0 installed in: /usr/local
-- Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags

但我确实安装了Glog / Gflags:

~$ sudo apt-get install libeigen3-dev libgflags-dev libgoogle-glog-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libgflags-dev is already the newest version.
libgoogle-glog-dev is already the newest version.
libeigen3-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

有人可以帮忙吗?谢谢!

1 个答案:

答案 0 :(得分:0)

问题解决了。只需记住在再次运行cmake之前清除所有cmake缓存文件(删除整个构建文件夹)。