MATLAB: How to calculate the distance between two pixels

distanceeuclidean

find the distance between two pixels in an image..

Best Answer

dist=sqrt((y2-y1)^2+(x2-x1)^2);%%%% Where (x1,y1) and (x2,y2) are coordinates of two pixels