opencv设置ROI

 pPhoto = cvCreateImage(photo_size, IPL_DEPTH_8U, 1); pImg = cvCreateImage(photo_size, IPL_DEPTH_8U, 1); cvCopy(pPhoto, pImg); CvRect omega = cvRect(110, 100, 200, 150); cvSetImageROI(pImg, omega); cvNamedWindow("image"); cvShowImage("image", pImg);

 

2、关于cvGoodFeaturesToTrack的MASK参数ROI的设定

CvRect rect= cvRect(3,120,1000,950); IplImage*ImageROI=cvCreateImage(cvGetSize(Image),IPL_DEPTH_8U,1); cvZero(ImageROI); cvSetImageROI(ImageROI, rect); cvSet(ImageROI,cvScalar(255)); cvResetImageROI(ImageROI); cvGoodFeaturesToTrack(Image,corners1,corners2, corners,&cornerCount, 0.16, 145, ImageROI)

 

你可能感兴趣的:(opencv设置ROI)