Ask Your Question

volvic's profile - activity

2015-04-15 08:44:44 -0500 received badge  Favorite Question (source)
2015-01-19 06:54:33 -0500 received badge  Famous Question (source)
2014-04-18 13:18:12 -0500 received badge  Notable Question (source)
2014-02-19 17:32:18 -0500 received badge  Popular Question (source)
2013-08-08 14:09:01 -0500 commented answer FREAK or BRISK neither good nor faster than SIFT/SURF when using BruteForceMatcher

Thanks a lot! These really clear up my doubts.

2013-08-08 13:59:21 -0500 received badge  Scholar (source)
2013-08-08 03:02:53 -0500 received badge  Student (source)
2013-08-08 02:14:52 -0500 asked a question FREAK or BRISK neither good nor faster than SIFT/SURF when using BruteForceMatcher

I try to match images against a database (100 images) to find the best matched image.

With OpenCV, I first tried SIFT feature with FlannBasedMatcher and found it worked well. But, because SIFT is patented, I turned to BRISK and FREAK. For both, I used BRISK detector (i.e. AGAST) and BruteForceMachter as they are binary descriptors. As claimed in the original BRISK and FREAK papers, they should have comparable accuracy and be faster than SIFT.

But unfortunately the result was really bad. My code of matching part looks like

BruteForceMatcher<Hamming> matcher;

//before matching, first add all descriptors of 100 images into matcher
...(get train_descriptors out of each image)
matcher.add(vector<Mat>(1, train_descriptors));

vector<KeyPoint> key_points;
Mat descriptors;
BRISK detector(30, 3, 1.0f);
detector.detect(test_image, keypoints);
FREAK extractor; //or BRISK extractor(30, 3, 1.0f);
extractor.compute(test_image, keypoints, descriptors);

vector<DMatch> matches;
matcher.match(descriptors, matches);
//choose good matches
vector<DMatch> good_matches;
for(size_t i=0;i<matches.size();i++) {
    if(matches[i].distance < 90) {

I used a matching Hamming distance threshold of 90 as suggested in the BRISK paper. However, the good_matches contains not so many matches (usually 20 matches or so), out of which only about 25% (or even worse) belong to the correct matched image. This result is much much worse than SIFT where this proportion is commonly over 90%.

In addition, they were not faster either. After the train set (100 images) is trained and indexed using FlannBasedMatcher, the matching of SIFT is actually much faster than BRISK/FREAK with BruteForceMatcher. Therefore, I also tried to use FlannBasedMatcher with LshIndexParams for BRISK/FREAK like

FlannBasedMatcher matcher(new flann::LshIndexParams(20,10,2));

But the results were still bad and not faster either.

So I have two questions here:

  1. How to determine a good match (to exclude outliers) for binary descriptors?

  2. Which matcher should be used for FREAK/BRISK to speed up the matching? (comparable to SIFT with FlannBasedMatcher).

Thank you in advance for any hints.