0
$\begingroup$

In this slides, on page 4, the SSD can be seen as cross-correlation:

http://www.lira.dist.unige.it/teaching/SINA/slides-current/pyramids.pdf http://www.cse.yorku.ca/~kosta/CompVis_Notes/ssd_cross-correlation.pdf

The SSD is defined as:

$$SSD(m,n) = \sum_i \sum_j [g(i,j) - t(i-m,j-n)]^2,$$

and expand the SSD. It looks like this:

$$SSD(m,n) = \sum_i \sum_j [g(i,j)^2 + t(i-m,j-n)^2 - 2g(i,j)t(i-m,j-n)], $$

where the squared terms can be assumed as constant. As a result, the cross-correlation remains:

$$R(m,n)= \sum_i \sum_j [g(i,j) t(i-m, j-n)].$$

Question: Why can we assume that the squared terms are constant?

$\endgroup$
  • $\begingroup$ well, for those of us in audio and speech processing, we've been calling this "ASDF" (for Average Squared Difference Function) and have only one dimension instead of two. but the reason for its relationship to autocorrelation is the same and shown in this answer from before. $\endgroup$ – robert bristow-johnson Mar 15 at 0:55
0
$\begingroup$

The second term is constant because $\sum_{i, j}t(i-m, j-n)^2$ is simply the energy of the template and importantly does not depend on $m$ or $n$.

Assuming that $\sum_{i, j}g(i,j)^2$ is constant is equivalent to assuming that the energy in the section of the image that aligns with the template does not vary with the position of the template (dictated by $m$ and $n$). I am not quite sure why this is a valid assumption, perhaps someone else may be able to help here.

$\endgroup$
  • $\begingroup$ Why do the not-squared terms depend on m or n? $\endgroup$ – j35t3r Feb 13 at 15:37
  • $\begingroup$ For each $m$ and $n$ the template ends up over a different region in the image, which means that $g(i,j)t(i-m, j-n)$ differs for each $m$ and $n$. $\endgroup$ – Abraham Feb 13 at 22:15
  • $\begingroup$ @j35t3r Nobody is claiming that the squared terms don't individually depend on $m$ and $n$. What is being claimed is that the sum of the squared terms is a constant, I,e.. not dependent on $m$ and $n$. $\endgroup$ – Dilip Sarwate Mar 20 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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