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)
More Related Contents:
- OpenCV C++/Obj-C: Detecting a sheet of paper / Square Detection
- Installing OpenCV 2.4.3 in Visual C++ 2010 Express [closed]
- Executing cv::warpPerspective for a fake deskewing on a set of cv::Point
- Rotate an image without cropping in OpenCV in C++
- OpenCV VideoCapture lag due to the capture buffer
- Is there a formula to determine overall color given BGR values? (OpenCV and C++)
- Camera position in world coordinate from cv::solvePnP
- OpenCV unable to set up SVM Parameters
- Rotate an image in C++ without using OpenCV functions
- Using hierarchy in findContours () in OpenCV?
- Cannot get OpenCV to compile because of undefined references?
- Setting ROI with mouse from a rectangle on a video
- Audio output with video processing with opencv
- Rotate cv::Mat using cv::warpAffine offsets destination image
- Removing watermark out of an image using OpenCV
- MATLAB vs C++ vs OpenCV – imresize
- OpenCV: How to visualize a depth image
- Why are the return values of these doubles -1.#IND?
- process video stream from memory buffer
- OpenCV SURF function is not implemented
- Unable to read frames from VideoCapture from secondary webcam with OpenCV
- how to remove straight lines or non-curvical lines in a canny image
- How can I determine distance from an object in a video?
- How to calculate the angle from rotation matrix
- Improve matching of feature points with OpenCV
- Is opencv matrix data guaranteed to be continuous?
- OpenCV tracking using optical flow
- Using custom camera in OpenCV (via GStreamer)
- How to open a GStreamer pipeline from OpenCV with VideoWriter
- Differences of using “const cv::Mat &”, “cv::Mat &”, “cv::Mat” or “const cv::Mat” as function parameters?