error using BRISK + GridAdaptedFeatureDetector
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
Can't you use
FeatureDetector::create("GridBRISK");
instead, as described here?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?