Ask Your Question

Need clarification on matchTemplate

asked 2012-11-12 10:47:21 -0600

unxnut gravatar image

updated 2012-11-12 11:00:10 -0600

I am working with the matchTemplate function to locate the template in an image. I have gone over the tutorial and the documentation on the six different methods to do the job. I have started to use TM_COEFF_NORMED for my application but it seems to give me a result that is slightly displaced. I have checked my code over and over again but unable to find the cause for displacement.

The relevant URLs are: - -

Another question that comes to my mind is the circumstances in which the different methods may be more applicable. In particular, I'm interested in finding out when I should use TM_COEFF_NORMED vs TM_CORR_NORMED. I can see the mathematical formulas but am looking for guidance from someone experience on when I should be using a particular method.

I'll certainly appreciate any help I can get here.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-10-18 04:00:15 -0600

pklab gravatar image

Looking at math formulas the TM_COEFF scales the operand with respective average than result should be less sensible (or invariant) to all linear illumination changes.

edit flag offensive delete link more

Question Tools


Asked: 2012-11-12 10:47:21 -0600

Seen: 488 times

Last updated: Oct 18 '13