How can I retrieve the coordinates of polygon vertices in a matrix?

15 views (last 30 days)
I'm trying to draw a polygon on an image and then retrieve the coordinates of the vertices of the polygon, but I haven't been able to with the getPosition function. My polygon is stored in the variable roi, but when I call getPosition(roi) I get an error that says "Undefined function 'getPosition' for input arguments of the type 'images.roi.Polygon'." What does this mean? Is there a way to store the coordinates of the vertices in a variable?

Accepted Answer

Matt J
Matt J on 1 Aug 2021
Edited: Matt J on 1 Aug 2021
Just do roi.Position

More Answers (0)

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!