cropped = cvCreateImage( cvSize(new_width, new_height), 8, 3)
src_region = cvGetSubRect(image, opencv.cvRect(left, top, new_width, new_height) )
cvCopy(src_region, cropped)
You'd think this would be easy and/or documented, but nope!
cropped = cvCreateImage( cvSize(new_width, new_height), 8, 3)
src_region = cvGetSubRect(image, opencv.cvRect(left, top, new_width, new_height) )
cvCopy(src_region, cropped)
6 comments:
thanks - safed me a lot of hassle
greets from sevilla
daniel
yep, me too
Thx alot
Another way is:
cvSetImageROI(src_region, cvRect(left, top, new_width, new_height));
cvCopy(src_region, cropped)
cvResetImageROI(src_region);
thanks you have saved me from a lot of trouble
Thank man ! that's what we need !
Post a Comment