Unable to make OpenCV 3.0.0 beta with opencv_contrib
I'm trying to build OpenCV 3.0.0 beta with opencv_contrib and CUDA, but I run into the following errors during make
/home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp: In member function ‘virtual void SURF_test::run()’:
/home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:287:23: error: cannot declare variable ‘surf’ to be of abstract type ‘cv::xfeatures2d::SURF’
In file included from /home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:21:0:
/home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:74:20: note: because the following virtual functions are pure within ‘cv::xfeatures2d::SURF’:
/home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:81:26: note: virtual void cv::xfeatures2d::SURF::setHessianThreshold(double)
/home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:82:28: note: virtual double cv::xfeatures2d::SURF::getHessianThreshold() const
/home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:84:26: note: virtual void cv::xfeatures2d::SURF::setNOctaves(int)
/home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:85:25: note: virtual int cv::xfeatures2d::SURF::getNOctaves() const
/home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:87:26: note: virtual void cv::xfeatures2d::SURF::setNOctaveLayers(int)
/home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:88:25: note: virtual int cv::xfeatures2d::SURF::getNOctaveLayers() const
/home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:90:26: note: virtual void cv::xfeatures2d::SURF::setExtended(bool)
/home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:91:26: note: virtual bool cv::xfeatures2d::SURF::getExtended() const
/home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:93:26: note: virtual void cv::xfeatures2d::SURF::setUpright(bool)
/home/kal/opencv_contrib/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp:94:26: note: virtual bool cv::xfeatures2d::SURF::getUpright() const
/home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:291:44: error: no match for call to ‘(cv::xfeatures2d::SURF) (cv::Mat&, cv::Mat, std::vector<cv::KeyPoint>&, cv::Mat&)’
/home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:294:44: error: no match for call to ‘(cv::xfeatures2d::SURF) (cv::Mat&, cv::Mat, std::vector<cv::KeyPoint>&, cv::Mat&)’
/home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp: In member function ‘virtual void ORB_test::run()’:
/home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:342:17: error: no matching function for call to ‘cv::ORB::ORB(int)’
/home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:342:17: note: candidates are:
In file included from /home/kal/opencv-3.0.0-beta/modules/calib3d/include/opencv2/calib3d.hpp:48:0,
from /home/kal/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:4:
/home/kal/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:163:20: note: cv::ORB::ORB()
/home/kal/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:163:20: note: candidate expects 0 arguments, 1 provided
/home/kal/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:163 ...
Same thing happens to me.
The same thing happens to me, CUDA6.0, 32-bit OS dirty work-around: disabling tests concerning SURF and ORB in /samples/gpu/performance/tests.cpp (Obcviously it is not a real solution! )
And somehow, even when perf_tests are switched off in cmake, gpu performance tests are executed...?