# Normalized cross-correlation in detail

I'm trying to implement a normalized cross-correlation algorithm but I don't get what in fact is this measure. What confuses is the wikipedia definition:

$\frac{1}{n} \sum \frac{(f(x,y)- \overline{f})(t(x,y)- \overline{t}) }{\sigma_{f}\sigma_{t}}$

Which result is an scalar (AFAIK)

But then adds other way to measure it:

$\left \langle \frac{F}{\left \| F \right \|},\frac{T}{\left \| T \right \|} \right \rangle$

Where $F$ and $T$ are normalized vectors and $\left \langle . , . \right \rangle$ is the inner product. But the output will be a vector, isn't? Isn't supposed to give me a scalar as well? Am I getting something wrong?

The idea is to implement this formula and use it with matrices with same dimensions.

Thank you

• I thought the inner product was a scalar by definition. – Niki Estner Dec 3 '13 at 13:06

The inner product or dot product or scalar product will not output a vector, it will output a scalar which is (with exception of the $1/n$ in front of the sum) the same as the first equation that you gave. See here for details