Specify region-of-interest (ROI) window


The ROIPosition property specifies the region-of-interest acquisition window. The ROI window 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]



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


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


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


Height of the ROI, measured in rows. 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.



Read only while running

Data type

1-by-4 element vector of doubles


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

See Also



Was this topic helpful?