1
$\begingroup$

I have understood convolution and it seems almost same as correlation mathematical expression wise. But in terms of signal processing,both are different operations.

The difference between convolution and cross-correlation from a signal-analysis point of view

I have read above answer and i some how understood through it that correlation is a technique used to detect presennce of a signal in a noisy background

But how correlation works? Can it only detects presence of original signal or can it also reconstruct and recover original signal?

Especially i am unable to understand the following sentence in MBaz answer

"If the correlation is large for a given time delay τ, then we may be confident in saying that the answer is yes"

Can someone please elaborate this sentence?

$\endgroup$
2
  • $\begingroup$ This question may help as an answer. $\endgroup$ Aug 9, 2022 at 17:18
  • $\begingroup$ My recommendation to you is to experiment with simulation using Matlab or Python to get a better intuitive understanding. If you plot the output of cross correlation when a signal is present and when it is not present you will very quickly see what is going on. In the simplest terms, correlation tells you how much of one signal is in another signal, so that when they overlap, you get a big strong spike. That is the exact sample (or time) the signal starts. $\endgroup$ Aug 9, 2022 at 19:27

1 Answer 1

3
$\begingroup$

Mathematically, the only difference between convolution and correlation is that one of the inputs is reversed for the convolution. This reversal is necessary to perform the "filtering" operation that MBaz was referring to. In performing a correlation, no time reversal is needed, as you are just trying to perform a pattern match between two inputs.

To intuitively understand what the correlation is doing, consider the following example. Your friend took a picture while on vacation in some foreign country and sent it to you, but failed to mention where the picture was taken. You decide that you want to identify the location that the picture was taken by traveling to that country yourself. Wherever you travel, you hold that picture up to the scene that you are viewing and are looking for similar features between the picture and the scene. The more similar the features of the picture and the scene, the more confident you are that the picture was taken where you stand. The correlation performs this comparison by sliding one input (i.e. the picture) over the other input (i.e. the scene) which is similar to you traveling to different places, and for each position the picture is in, performs a multiplication of all pixels between the translated picture and the scene before taking the sum those products. The result is a measure of confidence of the picture being taken in that position.

Can it only detect the presence of original signal or can it also reconstruct and recover the original signal?

The correlation makes no assumptions about what the inputs are, nor whether one input was corrupted in any way, so asking about signal reconstruction without any further context does not make much sense. You are simply comparing two inputs over some time/position offset.

"If the correlation is large for a given time delay τ, then we may be confident in saying that the answer is yes"

MBaz simply states that the larger the output of the correlation for a given time delay/position, the more similar the picture and the scene were to each other. It is up to the user to interpret what the exact magnitude of the output of the correlation means, as a high output could mathematically originate from two situations - your inputs are very similar to each other (a good match between picture and scene), or the scene has a localized high amount of energy relative the rest of the scene that causes the multiplication-sum operation to be larger than the other positions/time delays. Also remember that just because the picture and scene may be similar does not mean that they are the same, which could be a potential false positive detection in the pattern matching sense.

$\endgroup$

Your Answer

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

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