Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 2015-09-28 13:08:19 -0500

SR gravatar image

How to initializa a FeatureDetector with OpenCV 3?

With OpenCV 3 I get a SegFault when running the detect() function of either the ORB or AKAZE detector although the pointer is not null. I assume that something is not initialized. But my compiler is unable to find the previously necessary cv::initModule_features2d();. What do I need to do to initialize the feature detectors properly?

How to initializa initialize a FeatureDetector with OpenCV 3?

With OpenCV 3 I get a SegFault when running the detect() function of either the ORB or AKAZE detector although the pointer is not null. I assume that something is not initialized. But my compiler is unable to find the previously necessary cv::initModule_features2d();. What do I need to do to initialize the feature detectors properly?

How to initialize a FeatureDetector with OpenCV 3?

With OpenCV 3 I get a SegFault when running the detect() function of either the ORB or AKAZE detector although the pointer is not null. I assume that something is not initialized. But my compiler is unable to find the previously necessary cv::initModule_features2d();. What do I need to do to initialize the feature detectors properly?

The code is roughly like the following:

   cv::FeatureDetector* detector = cv::ORB::create();
   CV_Assert( detector != NULL );
   vector<cv::KeyPoint> kpts1;
   detector->detect(img, kpts, cv::Mat());

I tried both 8uc3 and 8uc1 images, both ORB and AKAZE and it always segfaulted. Tested on OS X 10.10.