# best-matches

I found matches between two images using BruteForceMatcher and knnMatch. The features in each image were generated by SURF or BRISK. I filtered out some of the matches by using the ratio test of the distances between the test feature and the second nearest neighbor. What I want to do is draw the matches between the two images so I can see if the points are indeed match. The problem is that I have way too many matches points (~2000). The features are not on a flat surface so I can not use getHomography to filter out the outliers. Is there a way to find the best N matches?

Thanks,

edit retag close merge delete

Sort by » oldest newest most voted

To filter out incorrect your matches you can use epipolar constraint. Use findFundamentalMat function with FM_RANSAC estimation method to estimate fundamental matrix based on matching points from 2 images. RANSAC can deal with situation when you have many outliers.

The function returs estimated fundamental matrix and a vector indicating which pair of matching points is inlier and which is outlier.

more

Official site

GitHub

Wiki

Documentation