Professional Documents
Culture Documents
Positioning of Object
Positioning of Object
getPosition
Return current position of ROI object
getPosition is not recommended. Using the new ROIs, retrieve the position of the ROI by accessing
the value of Position property instead. For more information, see Compatibility Considerations.
Syntax
pos = getPosition(h)
Description
pos = getPosition(h) returns the current position of the ROI object, h.
h — ROI object
imellipse | imfreehand | imline | impoint | impoly | imrect
ROI object, speci:ed as an imellipse, imfreehand, imline, impoint, impoly, or imrect object.
Position of the ROI object, returned as a numeric array. The shape of the array depends on the type of ROI
object.
imellipse 4-element vector of the form [xmin ymin width height], representing
the size and position of a bounding box around the ellipse. The initial size of
the bounding box is width-by-height pixels. The upper-left corner of the
box is at the (x,y) coordinate (xmin,ymin).
imfreehand n-by-2 matrix. The two columns de:ne the x- and y-coordinates, respectively,
of the n points along the boundary of the freehand region.
imline 2-by-2 matrix of the form [x1 y1; x2 y2], representing the position of
the two endpoints of the line.
https://it.mathworks.com/help/images/ref/imroi.getposition.html Page 1 of 2
Return current position of ROI object - MATLAB getPosition - MathWorks Italia 03/04/23, 10:14 AM
impoly n-by-2 matrix. The two columns de:ne the x- and y-coordinates, respectively,
of each of the n vertices.
imrect 4-element vector of the form [xmin ymin width height]. The initial
size of the rectangle is width-by-height pixels. The upper-left corner of
the rectangle is at the (x,y) coordinate (xmin,ymin).
Version History
expand all
Introduced in R2008a
See Also
imroi | setPosition | getPositionConstraintFcn
Topics
ROI Migration
https://it.mathworks.com/help/images/ref/imroi.getposition.html Page 2 of 2