0

Hello guys hope you are doing well. I am implementing a system that can detect object from given image frame in opencv 2.4.8. Currently I am dealing with FREAK algorithm because it is free. So as mentioned in tutorials and opencv docs I created objects of fastfeaturedetector and FREAK class

FastFeatureDetector detector(30);
FREAK extractor;

from here on code is most similar to the opencv example http://docs.opencv.org/doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.html instead of FLANN I used Bruteforce

BruteForceMatcher<Hamming> matcher;

for both object and real time image frame I find key points and descriptors

detector.detect(frame,keypoints_frame);
descriptors_frame.convertTo(descriptors_frame,CV_32F);
extractor.compute(frame, keypoints_frame, descriptors_frame);

Then I match descriptors using "match"-

matcher.match( descriptors_object, descriptors_frame, matches);

When I check the size of matches(which is defined as std::vector< DMatch > matches;) IT IS ZERO for image frame that has object(object to be detected).So I can't perform findhomography.(but the code works up to finding matches ) But when I run drawmatches it draws the the points on the detected object on the given frame. When I run the same algorithm with surf, BRISK they gives match size >0 and then I can perform find homography with it and proceed.

Can you please tell me why I am getting zero matches for FREAK? What can I do to avoid that and to perform find homography? The code works well with surf and BRISK (but they give false results too but I can deal with them) Thanks in advance!!

note:- I think my question is clearer to you. Please let me know and I will edit as you want.

d91
  • 83
  • 1
  • 8
  • Hello no one? please..... – d91 Aug 09 '15 at 09:14
  • Are you using OpenCV 3.0? If not you should and you should refer to newer documentation: http://docs.opencv.org/3.0-beta/doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.html (it is bad that this page doesn't appear in Google results first) - can you put your full code on here? – aledalgrande Aug 10 '15 at 19:54
  • PS: did you try AKAZE? It's very good in finding quality matches. – aledalgrande Aug 10 '15 at 19:56
  • no I am using opencv 2.4.8. so i can not try AKAZE. anyway thanks for info. – d91 Aug 15 '15 at 05:26

0 Answers0