1 | initial version |
Venky gave you the right answer, I will just explain it a little more detailed. If you were comparing pixel locations, a best match would always have the same pixel coordinates. This only works, when you have identical or near identical images you are comparing. But assume that one image is cropped. You would then have an offset for your best match. So you don't want to compare pixel locations in order to define if it's a good match or not.
What you really want: compare the corresponding descriptor vectors. Every keypoint has a location and a descriptor which somehow describes the surroundings of that pixel. Those descriptor vectors have a fixed length to make it easier to compare them. When you calculate the distance between two descriptor vectors and the distance is very small, that means, that the surroundings of the two keypoints to be compared are very similar. Distance metrics can be for example euclidian for float vectors or the Hamming distance for boolean descriptor vectors.
I hope this helps you to understand how keypoint matches are computed.