关于opencv3.2的编译有一大堆教程。可自寻查看。在Qt中使用opencv需要在pro文件中添加 相应的头文件和 动态链接库。如下
INCLUDEPATH += .
INCLUDEPATH += /usr/local/include
INCLUDEPATH += /usr/local/include/opencv
INCLUDEPATH += /usr/local/include/opencv2
INCLUDEPATH += /usr/local/include/opencv2/core
INCLUDEPATH += /usr/local/include/opencv2/highgui
INCLUDEPATH += /usr/local/include/opencv2/imgproc
INCLUDEPATH += /usr/local/include/opencv2/flann
INCLUDEPATH += /usr/local/include/opencv2/photo
INCLUDEPATH += /usr/local/include/opencv2/video
INCLUDEPATH += /usr/local/include/opencv2/videoio
INCLUDEPATH += /usr/local/include/opencv2/features2d
INCLUDEPATH += /usr/local/include/opencv2/objdetect
INCLUDEPATH += /usr/local/include/opencv2/calib3d
INCLUDEPATH += /usr/local/include/opencv2/ml
INCLUDEPATH += /usr/local/include/opencv2/contrib
INCLUDEPATH += /usr/local/share/OpenCV/
LIBS += -lX11 -pthread -lGL
LIBS += -L/usr/lib/x86_64-linux-gnu/libv4l/libv4l2convert.so
LIBS += -L/usr/lib/x86_64-linux-gnu/libv4l
ubuntu16.04 Qt5.8 如何使用opecv3.2
最新推荐文章于 2020-04-14 00:54:15 发布