Define image ROI with OpenCV in C
问题 I have a question about how to define a ROI with OpenCV. I know what the definition of the function cvSetImageROI but I want to know if is possible to define a ROI with OpenCV with a different shape than rectangle. For example, define a ROI in a circle or in different form. It is possible to do this? cvSetImageROI(img1, cvRect(a, b, c, d)); 回答1: The following code, which you could have found here or even here sets a circular ROI using a bit mask on your image. #include "cv.h" #include