1

谁能告诉我如何配置 Qt 5.1 以使用 openCV 的指南?

带有 WITH_QT 标志的已配置和构建的 openCV。make、make install 步骤成功。我现在有一个带有标题的安装文件夹、一个 bin ( .dll) 和一个 lib ( .dll.a) 文件夹。

我主要对

LIBS += ???

部分。我见过各种各样的 *.pro 文件,但不是一个有效的文件。我的解决方案(将 bin 文件夹添加到路径):

INCLUDEPATH += D:/Development/OpenCV/opencv-mingw-qt5/install/include

LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_calib3d246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_contrib246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_core246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_features2d246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_flann246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_gpu246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_imgproc246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_highgui246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_legacy246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_ml246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_nonfree246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_objdetect246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_photo246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_stitching246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_superres246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_ts246.a 
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_video246.dll.a
LIBS += D:/Development/OpenCV/opencv-mingw-qt5/install/lib/libopencv_videostab246.dll.a

何时开始调试/发布:

Starting D:\Qt\Projects\mVsion\build-mVsion-Default-Debug\debug\mVsion.exe...
The program has unexpectedly finished.
D:\Qt\Projects\mVsion\build-mVsion-Default-Debug\debug\mVsion.exe exited with code -1073741515

Starting D:\Qt\Projects\mVsion\build-mVsion-Default-Release\release\mVsion.exe...
SHIMVIEW: ShimInfo(Complete)
The program has unexpectedly finished.
D:\Qt\Projects\mVsion\build-mVsion-Default-Release\release\mVsion.exe exited with code -1073741515

任何想法?

4

0 回答 0