Ask Your Question

Revision history [back]

Hi guys, I ended up writing my own function from the matchTemplate() source code, with the CV_SQDIFF_NORMED method; it takes a transparent PNG and creates a vector with the coordinates of every point in the mask (every point that has an alpha >0) then it uses this point to access every point in the image for a given offset, instead of using the integral rectangle trick as it is actually done in the original function. It' s surely slower but it seems to work.

VS2010 demo code here

Hope it helps

image description