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

1 Ansicht (letzte 30 Tage)
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!!!

Akzeptierte Antwort

Matt J
Matt J am 1 Okt. 2022
Copy the first point and append it to the end of the list

Weitere Antworten (1)

Matt J
Matt J am 1 Okt. 2022
Use thte points to contruct a polyshape object,
plot(polyshape(points))

Kategorien

Mehr zu Elementary Polygons finden Sie in Help Center und File Exchange

Produkte


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by