问题
i am using SIFT algorithm in matlab to determine the similarity between template image and a set of images, where in the end i have to determine the best match between set of images on the basis of SCORES,is it true to say that higher the score of an image the better the match? i am aware that when there is an exact match, the score is zero, but what if the image is similar?
回答1:
I assume by SCORES you mean a similarity measurement between a pair of matched descriptors (e.g. euclidean distance). If my assumption is correct, statistically averaging the scores of all matches (e.g. SSD) should give you a degree of similarity between the two images. I.e., the smaller the averaged scores, the higher the similarity, zero meaning perfect match. To improve this similarity metric you can have a look at RANSAC which is able to remove outliers in your set of matched descriptors.
EDIT: Averaging the match scores is of course only meaningful if the percentage of matched descriptors is sufficiently high (as Maurits suggests). So a combination of counting matches and averaging distances might be a reasonable approach.
回答2:
This problem is slightly more involved than it perhaps may seem. To get an idea, try matching SIFT descriptors between your template and your target image based on the l1 or l2 distance alone and display the results. So you match each template point to a target point when the l1 or l2 distance is the smallest. In terms of the metric, you can not do better. However, visually, you will see that this gives bad results.
This has made people come of with different matching strategies. The default one deployed by most programs is to match using the l2 distance, but to only accept a match between two points, if the second best match is significantly (like 60 percent) worse. It works quite well, but in this strategy, some points will never be matched. As a 'score' you could start by experimenting with the percentage of points between a template and an image that get matched or paired successfully.
The strategy most people deploy on top is to ascertain that between the matching template and image points, a relationship such as x= Ax'
should hold. Meaning, that if the image is a rotated copy of the template, we expect to find a rotation matrix A
between matching SIFT points x'
and x
. A common used method to pool a large collection of matching points set for such a relation is RANSAC. All points that do not adhere to this consensus deformation A
can then be removed as outliers from the set.
A good demo of this approach can be found on Peter Kovesi's site.
来源:https://stackoverflow.com/questions/10509974/interpreting-score-in-sift