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

1 vue (au cours des 30 derniers jours)
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!!!

Réponse acceptée

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

Plus de réponses (1)

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

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by