Equivalent to cvSetImageROI in the OpenCV C++ interface

Actually, it’s right on the docs. Shame on me.

//Make a rectangle
Rect roi(10, 20, 100, 50);
//Point a cv::Mat header at it (no allocation is done)
Mat image_roi = image(roi)

Leave a Comment