MATLAB: How to measure a distance between a

distance

I want to measure the distance between cyclist passing another cyclist by photo

Best Answer

  • Display an image in the Image Viewer.
imtool('moon.tif')
  • Click the Distance tool button in the Image Viewer toolbar or select Measure Distance from the Tools menu. The Distance tool allows you to measure distance with a click-and-drag approach. When you move the pointer over the image, the pointer changes to cross hairs . Position the cross hairs at the beginning of the region you wish to measure, hold down the mouse button, drag the cross hairs to the end of the region, and release the button.
  • The Distance tool displays the Euclidean distance between the two endpoints of the line in a label superimposed over the line. The tool specifies the distance in data units determined by the XData and YData properties, which is pixels, by default.