Autonomous
Autonomous

Reputation: 9075

How to use BestOf2NearestMatcher

I am trying to find the pairwise matches between descriptors of two images so that Ican estimate homography between them. There are other methods like BFMatcher and FlannBasedMatcher but I want to use BestOf2NearestMatcher. I have used following syntax:

vector<MatchesInfo> pairwise_matches;
detail::BestOf2NearestMatcher matcher(false,0.3,10,10);
matcher(features,pairwise_matches);
matcher.collectGarbage();

I am facing a problem as the pairwise_matches contains no matches and no inliers. I suspect there is some problem in matcher. If I implement a BFMatcher or a FlannBasedMatcher then I get 46 matches. Has anybody used this method?

More information on BestOf2NearestMatcher can be found here.

Upvotes: 3

Views: 2020

Answers (1)

old-ufo
old-ufo

Reputation: 2850

BestOf2NearestMatcher is implementation of the Lowe`s 2nd nearest neighbor ratio criterion described in SIFT paper, where he recommend to use ratio = 0.8. The same holds for the SURFs. Sometimes even 0.85. Value in 0.3 is too strictive.

Upvotes: 1

Related Questions