Ask Your Question

germano2239's profile - activity

2014-04-09 08:55:37 -0600 answered a question matchTemplate() with a mask

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

2014-04-09 08:55:03 -0600 answered a question matchTemplate() with a mask

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