Documentation Center

  • Trial Software
  • Product Updates


Supporting ROIs Test Procedure

As part of the Image Acquisition Toolbox Adaptor Kit, we now offer a test procedure and automated tests for third-party adaptor developers and camera vendors to test adaptors and hardware against the toolbox. This test procedure is part of that suite. For more information, see Testing Adaptors or Hardware.

After implementing ROIs per instructions in "Supporting ROIs" in this Adaptor Kit documentation, follow these steps to test region of interest (ROI).

Test ProceduresExpected Results
Run the following commands:
vidObj = videoinput
vidObj.ROIPosition = 
   [xoffset yoffset x y];
frame = getsnapshot(vidObj);


xoffset: integer value that 
   defines x offset
yoffset: integer value that 
   defines y offset
x: new width
y: new height

For example, if the original VideoResolution is [640 480], then define the new ROIPosition as follows:

vidObj.ROIPosition = 
   [100 100 320 240]

The output of size(frame) should display the new ROI, for example [320 240]. The displayed image should exhibit part of the full image that is expected for an ROI of [100 100 320 240].

To clean up after this step, delete and clear the object.

Was this topic helpful?