2 bizhen npu bizhen_npu 于 2016.04.07 09:03 提问

在Qt5.3.1中opencv2.4.9配置的问题 5C

(这是mainwindow.h里的内容,中间四个include包含的文件总是找不到)
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

//#include
#include

#include
#include
#include
#include

//#include "cv.h"
//#include "cxcore.h"
//#include "highgui.h"
#include
#include
#include
using namespace std;
using namespace cv;
class MainWindow : public QMainWindow
{
……(后面不打了)

(这是pro文件里opencv的配置,我的opencv文件是放在c:\opencv文件夹里的,系统的环境变量自己也配了)
INCLUDEPATH+=c:\opencv\opencv\build\include\opencv\

c:\opencv\opencv\build\include\opencv2\

   c:\opencv\opencv\build\include\

LIBS+=c:\opencv\opencv\MinGW\lib\libopencv_calib3d249.dll.a\

c:\opencv\opencv\MinGW\lib\libopencv_contrib249.dll.a\

c:\opencv\opencv\MinGW\lib\libopencv_core249.dll.a\

c:\opencv\opencv\MinGW\lib\libopencv_features2d249.dll.a\

c:\opencv\opencv\MinGW\lib\libopencv_flann249.dll.a\

c:\opencv\opencv\MinGW\lib\libopencv_gpu249.dll.a\

c:\opencv\opencv\MinGW\lib\libopencv_highgui249.dll.a\

c:\opencv\opencv\MinGW\lib\libopencv_imgproc249.dll.a\

c:\opencv\opencv\MinGW\lib\libopencv_legacy249.dll.a\

c:\opencv\opencv\MinGW\lib\libopencv_ml249.dll.a\

c:\opencv\opencv\MinGW\lib\libopencv_objdetect249.dll.a\

c:\opencv\opencv\MinGW\lib\libopencv_video249.dll.a

2个回答

CSDNXIAOS
CSDNXIAOS   2016.04.07 09:11

转载链接 , http://www.tuicool.com/articles/VZfue2

http://blog.csdn.net/u012234115/article/details/38612977

经过很久的配置终于成功了,不需要cmake,可以直接用添加库文件和QT的方法,这样简直不能太方便了,只需要在pro中添加相应的文件即可。

网上的教程都是教怎么用minGW......
答案就在这里:QT5.3.1和opencv的配置问题
----------------------Hi,地球人,我是问答机器人小S,上面的内容就是我狂拽酷炫叼炸天的答案,除了赞同,你还有别的选择吗?

wangyaninglm
wangyaninglm   Ds   Rxr 2016.04.07 11:21

是opencv 1里面的东西没有找到么?

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!