Alex Rivera | Logout

OpenCV template matching and transparency

Asked 2011-01-21T17:37:07.400
43

What's the way OpenCV handles transparency in image during template matching?

The problem is that the template image needs to have transparent parts, because in the original image there could be anything at those places.

I tried all of the methods, and none of them yielded positive results (e.g. position of template in original image wasn't detected correctly).

Edit
Report

1 Answer

-1

I think you're trying to do what in OpenCV is called template matching with a mask. I think you could try setting a ROI (region of interest) on the template. This SO question shows how to do it. (note that in that question the ROI is set on the target image, not the template, but the procedure is the same).

answered 2011-01-23T17:18:28.963

Your Answer