void GetImageRect(IplImage* orgImage, CvRect rectInImage, IplImage* imgRect,double scale) { //从图像orgImage中提取一块(rectInImage)子图像imgRect IplImage *result=imgRect; CvRect size; size.x=rectInImage.x*scale; size.y=rectInImage.y*scale; size.width=rectInImage.width*scale; size.height=rectInImage.height*scale; //result=cvCreateImage( size, orgImage->depth, orgImage->nChannels ); //从图像中提取子图像 cvSetImageROI(orgImage,size); cvCopy(orgImage,result); cvResetImageROI(orgImage); } 此网站为英文页面, 是否需要翻译?×不再翻译此网站人工翻译
时间: 2024-10-14 23:39:46