The optional rectangle is an array of four values. They are the left, top, right, bottom sides of the rectangle.
The easiest way to define the rectangle is to draw a region of interest (ROI) on the image, and use the global rectangle from the ROI. It should be in the same format as the optional rectangle.
Bruce
Bruce Ammons
Ammons Engineering