d91
d91

Reputation: 83

Bruteforcematcher with FREAK extractor gives zero matches

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.

Upvotes: 0

Views: 133

Answers (0)

Related Questions