Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to save a rectangular ROI?

I have extracted contours with cv2.findContours from a binary mask which I created using a segmentation algorithm. Each contour corresponds to an object in the image that I want to save to a save to a separate image file.

How can I get a rectangular region of interest (ROI) from a set of points (e.g. contour) and save that ROI to a separate image?

I use Python, but if you can post the answer for C++, that's also appreciated.

click to hide/show revision 2
retagged

updated 2014-02-28 06:47:15 -0500

berak gravatar image

How to save a rectangular ROI?

I have extracted contours with cv2.findContours from a binary mask which I created using a segmentation algorithm. Each contour corresponds to an object in the image that I want to save to a save to a separate image file.

How can I get a rectangular region of interest (ROI) from a set of points (e.g. contour) and save that ROI to a separate image?

I use Python, but if you can post the answer for C++, that's also appreciated.

How to save a rectangular ROI?

I have extracted contours with cv2.findContours from a binary mask which I created using a segmentation algorithm. Each contour corresponds to an object in the image that I want to save to a save to a separate image file.

How can I get a rectangular region of interest (ROI) from a set of points (e.g. contour) and save that ROI to a separate image?

I use Python, but if you can post the answer for C++, that's also appreciated.