Ask Your Question
1

detectAndCompute in OpenCV3 "not implemented"?

asked 2014-10-22 14:21:05 -0500

Doombot gravatar image

Whether by using this:

cv::FeatureDetector * detector = new cv::BRISK();   
detector->detect(objectImg, objectKeypoints);
detector->detect(sceneImg, sceneKeypoints);
delete detector;

cv::DescriptorExtractor * extractor = new cv::BRISK();
extractor->compute(objectImg, objectKeypoints, objectDescriptors);
extractor->compute(sceneImg, sceneKeypoints, sceneDescriptors);
delete extractor;

or

BRISK somecoolstuff;
somecoolstuff.detect(objectImg,objectKeypoints);
somecoolstuff.detect(sceneImg,sceneKeypoints);

somecoolstuff.compute(objectImg,objectKeypoints,objectDescriptors);
somecoolstuff.compute(sceneImg,sceneKeypoints,sceneDescriptors);

I am getting the following console error when the following code (OpenCV3, x64, Visual Studio) tries to evaluate "detect":

" OpenCV Error: The function/feature is not implemented <> in cv::Feature2D::detectAndCompute, file C:\opencv3\Sources\modules#features2d\src\feature2d.cpp, line 144 "

What is strange is that I used the folder C:\opencv3... in the past but now I am using D:\OpenCV3... (I reorganized my drives). All my linkers-include-etc. are correctly set up for the new folder.

So, is detectAndCompute supposed to work in OCV3, or is there some n00b error in my code? Using breakpoints, I can say that the code before is working correctly (objectImg, etc. are initialized and loaded).

edit retag flag offensive close merge delete

Comments

[update:]

the public constructor for BRISK has been removed in the meantime, so the method mentioned in the answer below is the only way left now (for the better, imho).

berak gravatar imageberak ( 2014-10-24 08:29:44 -0500 )edit

Haha working with OpenCV 3 right now is very is somewhat frustrating (since a lot of previous tutorials no longer work) but it is a good opportunity for me to become a more experienced programmer. Thanks you all for helping people here get on track!

Doombot gravatar imageDoombot ( 2014-10-24 08:36:40 -0500 )edit

well, they're not afraid to break things, and they're always 5 steps ahead of you ;)

berak gravatar imageberak ( 2014-10-24 08:39:17 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
3

answered 2014-10-22 16:24:18 -0500

Hi! Yes, detectAndCompute supposed to work in OCV3 ;-) You just have to create algorithm like that:

cv::Ptr<cv::BRISK> ptrBrisk = cv::BRISK::create();
ptrBrisk->detect(imTmp, objectKeypoints);

Your error is very simple but probably shows a design problem in Opencv3. Indeed, your code seems logical and correct, but behind-the-scenes, BRISK::create() doesn't create a BRISK object but a BRISK_Impl object!

edit flag offensive delete link more

Comments

Wow OK I'll check it out!

Doombot gravatar imageDoombot ( 2014-10-22 17:09:58 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-10-22 14:21:05 -0500

Seen: 11,191 times

Last updated: Oct 22 '14