user1619301
user1619301

Reputation: 21

opencv SIFT/SURF: how to determin whether the two images is matched or not?

I am new to SIFT/SURF of opencv, when I test it using two images, I am wondering how to determin whether these two images is matched or not.

For Example, I am matching image A and image B. When B is just a rotated image of A, It is easy to get the matches count , and then get the good matches count , and get the percentage by dividing them. But I found out that it is not working for other cases: My image A is a 325*365 image; My image B is a camerashot of Image A from Iphone5 with 640*1136 resolution while A is not full in it; When I match them by Sift/SURF and imshow the matches, It is matching loud and clear in my eyes. But here I want to ask , How to determine whether these two images is matched or not automaticaly by my program.

Upvotes: 2

Views: 2308

Answers (1)

old-ufo
old-ufo

Reputation: 2860

If you can estimate homography transformation between images, images match. If not, no match. Here is example from OpenCV documentation. http://docs.opencv.org/doc/tutorials/features2d/feature_homography/feature_homography.html

Function, which estimates homography, is Mat H = findHomography( obj, scene, CV_RANSAC );

Upvotes: 2

Related Questions