Main Content

ROIPosition

Specify region-of-interest (ROI) window

Description

The ROIPosition property specifies the region-of-interest acquisition window. The ROI defines the actual size of the frame logged by the toolbox, measured with respect to the top left corner of an image frame.

ROIPosition is specified as a 1-by-4 element vector

[XOffset YOffset Width Height]

where

XOffset

Position of the upper left corner of the ROI, measured in pixels.

YOffset

Position of the upper left corner of the ROI, measured in pixels.

Width

Width of the ROI, measured in pixels. The sum of XOffset and Width cannot exceed the width specified in VideoResolution.

Height

Height of the ROI, measured in pixels. The sum of YOffset and Height cannot exceed the height specified in VideoResolution.

Note

The Width does not include both end points as well as the width between the pixels. It includes one end point, plus the width between pixels. For example, if you want to capture an ROI of pixels 20 through 30, including both end pixels 20 and 30, set an XOffset of 19 and a Width of 11. The same rule applies to height.

In the figure shown above, the width of the captured ROI contains pixels 51 through 170, including both end points, because the XOffset is set to 50 and the Width is set to 120.

Characteristics

Access

Read only while running

Data type

1-by-4 element vector of doubles

Values

Default is [ 0 0 width height ] where width and height are determined by VideoResolution.

See Also

Properties

VideoResolution