# What units is the 'distance' measured in? (in the matches of a SURF)

I have been looking at feature detection and matching using the SURF and BFMatcher methods. In order to draw these matches, the maximum and minimum distances are calculated to help find 'good matches'

My question is, what unit is the distance calculated in? (cm, mm, inches).

This distance is the distance between two matched points. Is my understanding correct?

Thank you.

edit retag close merge delete

no, it's not the distance between the points, but the one between the corresponding feature vectors, aka norm(f1,f2,NORM_L2)

( 2015-02-09 08:55:03 -0600 )edit

So a 'larger distance' would represent a longer distance between two matched points and vice versa?

( 2015-02-09 09:09:39 -0600 )edit
2

again, no. it's the similarity of the feature vectors, not the distance between matched points

see, that's the whole trick of the feature-matching: you don't know, if the (other) image was rotated/scaled/translated, so you can't compare the point locations.

what you can compare, is the features at the found keypoints. if you find a similar one in the other set, you can estimate, that this is the corresponding keypoint.

( 2015-02-09 09:20:21 -0600 )edit

yes, I think it is in cm, too ... A 'larger distance' would represent that the two features are not similar, maybe you can start by understanding features and descriptors ;)

( 2015-02-09 09:25:14 -0600 )edit
1

no, nothing is ever measured in cm here.

the point distances are in pixels, the feature distances might be bits (for the binary ones, like orb and brief), or 'histogram bins' for surf/sift

( 2015-02-09 09:33:02 -0600 )edit

the cm was a joke, sorry about that. :)

( 2015-02-09 09:37:47 -0600 )edit

^^ oh, sorry, that i did not get it ;)

( 2015-02-09 09:44:31 -0600 )edit

That makes a lot more sense than what I was assuming it to be. Just to make sure I have understood. A 'shorter distance', would be a better match than a 'larger distance'?

( 2015-02-09 09:52:10 -0600 )edit

So can we say that the distance is the magnitude of difference between the descriptors?

( 2015-02-09 10:00:33 -0600 )edit

yes, shorter distance == better match.

what do you mean by 'magnitude' ?

( 2015-02-09 10:08:21 -0600 )edit