Return to Snippet

Revision: 40277
at January 28, 2011 16:25 by browny


Initial Code
void getSubImg(IplImage* img, IplImage* subImg, CvRect roiRect) {

	cvSetImageROI(img, roiRect);
	subImg = cvCreateImage(cvGetSize(img), img->depth, img->nChannels);
	cvCopy(img, subImg, NULL);
	cvResetImageROI(img);

}

Initial URL
http://nashruddin.com/OpenCV_Region_of_Interest_(ROI)

Initial Description

                                

Initial Title
[OpenCV] Copy SubImage from IplImage using ROI

Initial Tags

                                

Initial Language
C++