imfreehand() closes the curve in the image but does not save those "closing" points

1 visualización (últimos 30 días)
I want to freely draw a segment in an image and thats why im using:
H = imfreehand('Closed',1)
p = wait(H)
This closes the curve that im drawing (visually) but when I plot the points from p the points of the closing part of the curve are missing. Here´s an example:
The marked region of the curve is the one that it has been "closed" automatically:
But then when plotting those points saved in p, i have them missing (is the same segment but rotated):
Does anyone knows how to get those missing points from the segment?
Thanks!!!

Respuesta aceptada

Matt J
Matt J el 1 de Oct. de 2022
Copy the first point and append it to the end of the list

Más respuestas (1)

Matt J
Matt J el 1 de Oct. de 2022
Use thte points to contruct a polyshape object,
plot(polyshape(points))

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by