how to measure distance between points in X using interactive mouse

2 visualizaciones (últimos 30 días)
James Webster
James Webster el 24 de Sept. de 2012
Comentada: emami.m el 12 de Mzo. de 2019
Hello
I have used edge function to detect the edge of a shape in matlab, now I want to create a GUI where as someone moves their mouse over the image it draws a horizontal line between the points and measures the distance in X between the points, then when the mouse is clicked saves the distance.
Is this possible?
James

Respuestas (2)

Thomas
Thomas el 24 de Sept. de 2012
  5 comentarios
emami.m
emami.m el 12 de Mzo. de 2019
Thanks Thomas.
It was great.

Iniciar sesión para comentar.


Image Analyst
Image Analyst el 24 de Sept. de 2012
Try imfreehand() if you want to trace an arbitrary path. It doesn't "snap" to the next point though, like Photoshop's magnetic lasoo.

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by