templates - Mask / Zero out area outside specified ROI -


I am working on a project using OpenCV on template matching, and I limit the search area on an image Want to The image is captured continuously with the camera.

Is there a way to zero / mask the image out of defined ROI, so that the template matching process can be fast and accurate for the remaining area? Take a look at the

function.

zero cvSetImageROI (IplImage * image), CvRect rect)

Determines an Image Area (ROI) for a given rectangle The parameter:

  • Image - An indicator in the image header
  • Rect - ROI rectangle

If the original image ROI was zero and the rect Not a complete image, the ROI structure is allocated.

Most OpenCV functions support the use of ROI and consider the image rectangle as a separate image. For example, all pixel coordinates are calculated from the top-left (or lower-left) corners of the ROI, not the original image. Some good examples of using the

are ROI featrue


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -