Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

As I said

For further information about the issue on TM_CCOEFF_NORMED please follow issue #5688

At this time this is an open bug.

The issue highlighting should be clear to understand: here is the formula:

J = I(x,y) - AVG(I)   //I: the image portion under template
U = T(x,y) - AVG(T)   //T: the template
TM_CCOEFF_NORMED = SUM(U * J) / sqrt(SUM(U^2) * SUM(J^2))

In case of constant template each pixel is same as the average than:

U = T(x,y) - AVG(T) = 0
TM_CCOEFF_NORMED = SUM(0 * J) / sqrt[ SUM(0^2) * SUM(J^2) ] = 0/0

This is same also if the image portion under template is constant (J=0)

If you don't trust, try yourself with numbers