OpenCV - Object matching using SURF descriptors and BruteForceMatcher

倖福魔咒の 提交于 2019-11-28 16:44:40

The problem was in using Brute Force Matcher only, I found methods to obtain a set of good matches between two views at "OpenCV 2 Computer Vision Application Programming Cookbook"

Ch9: Matching images using random sample consensus

They are using K-Nearest Neighbor and RANSAC

And thanks

For removing outliers RANSAC + homography is a good method when comparing two planar images.

Homography is the model that RANSAC will try to use to compare points from both images and it will find the best set of points that better fit the projection model of the homography (the transformation from one plane to another).

cv::findHomography(srcPoints,dstPoints, RANSAC, status);

The function above will return an array status that has a 1 for indices considered inliers and 0 for indices considered outliers, so you can remove outliers by checking this status array.

You need to modify your Hessian, 2500 is too much. Try 50. When you use a big Hessian, the result is a lot of keypoints, resulting some unnecessary. Another information about SURF is that your marker need to be more rich, with more details.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!