Ask Your Question

normalized euclidean Distance between 2 points in an image

asked 2015-07-29 02:04:39 -0500

Nbb gravatar image

Hello forum,

When attempting to find the distance stated above, would it be better to use the bhattacharrya distance or the mahalanobis distance ?

The mahalanobis function requires an input of the covariance matrix. Based on wikipedia it says the matrix should be diagonal for the function to be equal to the normalized euclidean distance. I am not sure how to get that diagonal covariance matrix from 2 points in an image.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-07-29 02:52:31 -0500

You can simply use the norm interface of OpenCV to do it for you right? Some more info can be found here and here.

edit flag offensive delete link more


Sorry, what I meant was I would like the value to be between 0 to 1

Nbb gravatar imageNbb ( 2015-07-29 04:35:31 -0500 )edit

So once you got the distance measure, you want a value between 0 1? Then you will first have to decide what your maximum distance value will be for your application in order to have a correct remapping.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-07-29 04:49:13 -0500 )edit

Thanks and Sorry I misunderstood the use of the mahalanobis distance.

Nbb gravatar imageNbb ( 2015-07-31 03:39:15 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-07-29 02:04:39 -0500

Seen: 424 times

Last updated: Jul 29 '15