Compiler: Mingw32 gcc 4.8.1
Mingw32 g++ 4.8.1
QT version: 4.8.6
OpenCV version: 3.0.0
Test platform: Win7 x64
-----------------------
Focus: OpenCv 3.0.0 needs to be recompiled
and modify the relevant files, or you cannot use QT 4.8.6 to compile.
OPENCV Test Code:
Opencv_test.cpp
/** Filename:OpenCv_test.cpp*/#include<opencv2/core/core.hpp>#include<opencv2/highgui/highgui.hpp>#include<opencv2/imgproc/imgproc.hpp>#include<cv.hpp>#include<cxcore.hpp>#include<video/video.hpp>using namespaceCV;intMain () {Videocapture cap (0); if(!cap.isopened ()) { return-1; } Mat frame; Mat edges; BOOLStop =false; while(!stop) {Cap>>frame; Cvtcolor (frame, edges,/*Cv_bgr2rgb*/Cv_bgr2bgra);//0//Gaussianblur (edges, edges, Size (7,7), 1.5, 1.5); //Canny (edges, edges, 0, 3);Imshow ("Camera", edges); if(Waitkey ( -) >=0) Stop=true; } return 0;}
Opencv_test.pro
SOURCES + =opencv_test.cppheaders+=Includepath+ = E:\OpenCv_3.0. 0_build\include E:\OpenCv_3.0.0_BUILD\INCLUDE\OPENCV E:\OpenCv_3.0. 0_build\include\opencv2libs+ = E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_CALIB3D300.DLL.A E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_CORE300.DLL.A E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_FEATURES2D300.DLL.A E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_FLANN300.DLL.A E:\OpenCv_3.0. 0_build\x86\mingw\lib\libopencv_hal300.a E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_HIGHGUI300.DLL.A E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_IMGPROC300.DLL.A E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_IMGCODECS300.DLL.A E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_ML300.DLL.A E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_OBJDETECT300.DLL.A E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_PHOTO300.DLL.A E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_VIDEO300.DLL.A E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_VIDEOIO300.DLL.A E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_VIDEOSTAB300.DLL.A E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_SHAPE300.DLL.A E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_STITCHING300.DLL.A E:\OpenCv_3.0. 0_BUILD\X86\MINGW\LIB\LIBOPENCV_SUPERRES300.DLL.A E:\OpenCv_3.0.0_build\x86\mingw\lib\libopencv_ts300.a
Compile run Effect:
QT 4.7.6 drive Logitech C720 Camera