在ubuntu上包含nonfree openCV 2.4.10 [英] include nonfree openCV 2.4.10 on ubuntu

查看:191
本文介绍了在ubuntu上包含nonfree openCV 2.4.10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用此链接在ubuntu上安装了OpenCV,并且我正在尝试使用SURF描述符.我知道他们将这些类型的描述符的位置更改为nonfree模块,因此我们需要将其包括在内,如下所示:#include "opencv2/nonfree/features2d.hpp".问题是我在编译时遇到此错误:opencv2/nonfree/features2d.hpp no such file or directory.

I've installed OpenCV on ubuntu using this link and I'm trying to use SURF descriptor. I knew that they changed the location of these type of descriptors to the nonfree module so we need to include it, which is something like this: #include "opencv2/nonfree/features2d.hpp". The problem is that I'm getting this error at compile time: opencv2/nonfree/features2d.hpp no such file or directory.

有什么想法要解决吗?

已编辑: openCV的其他部分工作正常.我包括以下库,一切看起来都很好:

EDITED: The other parts of openCV are working fine. I'm including the following libraries and everything is looking good:

#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/legacy/legacy.hpp"

我检查了OpenCV目录中的inlcude文件夹,那里是nonfree文件夹.而且,它是我无法在QTCreator(我正在使用的环境)中访问的唯一库,因为我尝试包括在Inlcude文件夹中找到的所有其他库,而且它们看起来不错.

I checked the inlcude folder in my OpenCV directory and the nonfree folder is there. Moreover, it's the only library that I can't access within QTCreator (The environment I'm using) because I tried to include all the other librairies found in the Inlcude folder and they looked good.

EDITED2: 您可以在此上运行make VERBOSE=1时看到的截图链接

EDITED2: You can see a screenshot of what I saw when I ran make VERBOSE=1 on this link

所以不确定在哪里看?实际上,我在../usr/include/opencv2/

So not sure where to look? Actually, I did not find the nonfree folder in ../usr/include/opencv2/

谢谢.

推荐答案

实际上,我只是使用以下命令更新了openCV,然后它起作用了:

Actually, I just updated openCV using the following commands then it worked:

sudo add-apt-repository --yes ppa:xqms/opencv-nonfree
sudo apt-get update 
sudo apt-get install libopencv-nonfree-dev

这篇关于在ubuntu上包含nonfree openCV 2.4.10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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