我从github https://github.com/Itseez/opencv_contrib 获得了opencv_contrib包文件 并按照README说的那样成功构建了它,
$ cmake -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules ..
然后我输入make install来生成.so文件(我在这里误解了这个命令吗?)。 但是当我使用qt编译这个例子时,docs.opencv.org / master / db / d56 / tutorial_capture_graycode_pattern.html #gsc.tab = 0
它出现错误,如
undefined reference to `cv::structured_light::GrayCodePattern::Params::Params()'
我该怎么办?
我在.pro
中添加了以下内容INCLUDEPATH += /home/tau/opencv/opencv-3.1.0/include /home/tau/opencv/opencv_contrib/modules/structured_light/include
LIBS += -L/usr/local/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_video -lopencv_videoio-lopencv_structured_light