0
$\begingroup$

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

$\endgroup$
1
  • $\begingroup$ I thought the inner product was a scalar by definition. $\endgroup$ Commented Dec 3, 2013 at 13:06

2 Answers 2

3
$\begingroup$

An individual inner product does produce a scalar, but often when a cross correlation is calculated multiple individual cross correlations (i.e. dot products) are calculated at different time offsets. These individual scalar results form a vector that is indexed by the relative time offset.

$\endgroup$
1
  • $\begingroup$ F/||F|| will output a matrix right? And matrix multiplication result is also a matrix, isn't it? $\endgroup$ Commented Dec 4, 2013 at 16:46
1
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.