Troubles running BRIEF in (EXAMPLE) detector_descriptor_matcher_evaluation

asked 2013-06-01 07:30:57 -0600


I'm trying to evaluate BRIEF using the project (EXAMPLE) detector_descriptor_matcher_evaluation, but somehow the create function on line 294 does not return a valid detector. I'm referring to the line:

Ptr<FeatureDetector> detector = FeatureDetector::create(detector_name);

I stepped into that function and finally reached the following function:

Ptr<Algorithm> Algorithm::_create(const string& name)
    Algorithm::Constructor c = 0;
    if( !alglist().find(name, c) )
        return Ptr<Algorithm>();
    return c();

The function finds the BRIEF constructor in that list, i.e. it reaches the command return c(), but somehow does not return a valid detector. The problem does not occur using ORB or BRISK, but occurs with FREAK, SIFT and SURF.

Can someone please guide me to the reason that the code can't seem to create a BRIEF detector?

Thanks in advance!


edit retag flag offensive close merge delete


Which opencv-version? Guess you have included features2d, however for SIFT/SURF you also need to include the nonfree module: #include <opencv2/nonfree/nonfree.hpp> ? Have you also called initModule_nonfree().

Guanta gravatar imageGuanta ( 2013-06-01 13:12:57 -0600 )edit

Thanks, but having thought about it again, I decided to use the FAST detector for all my experiments, so the problem is basically solved. Thanks again!

GilLevi gravatar imageGilLevi ( 2013-06-01 18:47:29 -0600 )edit