Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The short answer to this question is that template matching is usually done in grayscale as you are looking to match texture and gradient information more than you are looking to match color. For most applications you aren't going to have two things that look exactly the same but are different colors, and more often than not some of that color information will be preserved in the grayscale image. Since you don't need color information for most applications there really isn't a good reason to perform the template match over all three channels.

That said, I could see how this could be confusing, or cases where there would be applications for this. I went ahead and filed a ticket to get this in the next release of the library.