The Art of Image Processing - Kindle eBook Company logo

Introduction to DSP - time domain processing: correlation

Correlation is a weighted moving average:

correlation formula

One signal provides the weighting function.

correlation calculation on a signal

The diagram shows how a single point of the correlation function is calculated:

  • first, one signal is shifted with respect to the other
  • the amount of the shift is the position of the correlation function point to be calculated
  • each element of one signal is multiplied by the corresponding element of the other
  • the area under the resulting curve is integrated

Correlation requires a lot of calculations. If one signal is of length M and the other is of length N, then we need (N * M) multiplications, to calculate the whole correlation function.

Note that really, we want to multiply and then accumulate the result - this is typical of DSP operations and is called a 'multiply/accumulate' operation. It is the reason that DSP processors can do multiplications and additions in parallel.

Copyrite:Bores Signal Processing backward/forward go back to start of module go back to previous page go to next page go to next module