error using BRISK + GridAdaptedFeatureDetector

asked 2013-04-28 20:23:27 -0600

RaulPL gravatar image

updated 2013-06-15 10:45:41 -0600

Hi, I'm trying to find keypoints using BRISK, I want the points to be well distributed across the image so I use the brisk detector + GridAdaptedFeatureDetector. The code is the following:

vector<KeyPoint> kp0,kp1;
Mat framek=imread("/home/raul/Escritorio/fotosPSE2/im190.png",0);
Mat framek2=imread("/home/raul/Escritorio/fotosPSE2/im202.png",0);        
Ptr<FeatureDetector> brisk = FeatureDetector::create("BRISK");
Ptr<FeatureDetector> detector = new GridAdaptedFeatureDetector(brisk,300,6,8);
detector->detect(framek,kp0,Mat());
detector->detect(framek2,kp1,Mat());

The problem is that I'm getting this error:

OpenCV Error: Bad argument (No parameter 'threshold' is found) in set, file /home/raul/OpenCV/OpenCV-2.4.9/modules/core/src/algorithm.cpp, line 619
OpenCV Error: Bad argument (No parameter 'threshold' is found) in set, file /home/raul/OpenCV/OpenCV-2.4.9/modules/core/src/algorithm.cpp, line 619
OpenCV Error: Bad argument (No parameter 'threshold' is found) in set, file /home/raul/OpenCV/OpenCV-2.4.9/modules/core/src/algorithm.cpp, line 619
terminate called after throwing an instance of 'tbb::captured_exception'
what():  /home/raul/OpenCV/OpenCV-2.4.9/modules/core/src/algorithm.cpp:619: error: (-5) No parameter 'threshold' is found in function set

If I only use brisk without the GridAdaptedFeatureDetector it works fine.

Am I doing something wrong? or is a bug? I don't know...

Thanks, Raúl

edit retag flag offensive close merge delete

Comments

1

Can't you use FeatureDetector::create("GridBRISK"); instead, as described here?

Nyenna gravatar imageNyenna ( 2013-04-29 02:10:54 -0600 )edit

Ptr<FeatureDetector> brisk = FeatureDetector::create("GridBRISK") doesn't cause an error. But how can I modify the threshold of BRISK detector and also the numbers of cells in the Grid?

RaulPL gravatar imageRaulPL ( 2013-04-30 03:12:13 -0600 )edit