/ Published in: C++
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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); }
URL: http://nashruddin.com/OpenCV_Region_of_Interest_(ROI)