Ask Your Question

Euclidean distance between two cv::Mat images

asked 2014-01-09 11:32:13 -0500

unxnut gravatar image

I am trying to write code whetre I need to compute Euclidean distance between two images (cv::Mat). Effectively, I'll take difference between corresponding pixels, sum the distances, and divide by the number of pixels. Both frames are of equal dimensions and depth. I could not find a function to do this by my search. I just wanted to confirm that such an inbuilt function does not exist before I write one myself. Can some knowledgeable person confirm that? Or point me to one if it exists?

edit retag flag offensive close merge delete



like norm ?

berak gravatar imageberak ( 2014-01-09 11:57:41 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-01-09 12:50:08 -0500

unxnut gravatar image

@berak: You are a life saver. That is what I am looking for. Please post it as an answer so that I can accept it. Wish there was a "Life Saver" badge I could award you.

edit flag offensive delete link more

Question Tools


Asked: 2014-01-09 11:32:13 -0500

Seen: 6,460 times

Last updated: Jan 09 '14