Qt配置Opencv
准备工作:
- Qt
- opencv(编译过的)
首先创建一个基本的项目,然后我们会发现有Pro文件,这个Pro文件我们可以发现,它里面包含了我们有那些文件,ui,等等。所以我们可以理解为一个配置文件,也就是config文件。
然后我们在pro文件的最下面加上我们的opencv编译的文件的路径。
INCLUDEPATH += D:\opencv450\opencv\build\include INCLUDEPATH += D:\opencv450\opencv\build\include\opencv2 INCLUDEPATH += D:\opencv450\opencv\build\bin INCLUDEPATH += D:\opencv450\opencv\newbuild\install\include LIBS += -LD:\opencv450\opencv\newbuild\install\x64\mingw\bin\ -llibopencv_calib3d450 \ -llibopencv_core450 \ -llibopencv_dnn450 \ -llibopencv_features2d450 \ -llibopencv_flann450 \ -llibopencv_gapi450 \ -llibopencv_highgui450 \ -llibopencv_imgcodecs450 \ -llibopencv_imgproc450 \ -llibopencv_ml450 \ -llibopencv_objdetect450 \ -llibopencv_photo450 \ -llibopencv_stitching450 \ -llibopencv_video450 \ -llibopencv_videoio450 \ #-opencv_videoio_ffmpeg.dll \