DSPRelated.com
Forums

Cross Correlation Query

Started by Unknown July 16, 2007
>From Wikipedia: http://en.wikipedia.org/wiki/Cross_correlation
"The cross-correlation is similar in nature to the convolution of two functions. Whereas convolution involves reversing a signal, then shifting it and multiplying by another signal, correlation only involves shifting it and multiplying (no reversing)." This seems wrong to me because cross correlation is the one with the complex conjugate, which is equivalent to reversing the signal, and convolution is the one with no conjugate. Maybe I've misunderstood something. Peter Bone
On Jul 16, 5:51 am, peterb...@gmail.com wrote:
> >From Wikipedia:http://en.wikipedia.org/wiki/Cross_correlation > > "The cross-correlation is similar in nature to the convolution of two > functions. Whereas convolution involves reversing a signal, then > shifting it and multiplying by another signal, correlation only > involves shifting it and multiplying (no reversing)." > > This seems wrong to me because cross correlation is the one with the > complex conjugate, which is equivalent to reversing the signal, and > convolution is the one with no conjugate.
That's incorrect. Conjugating a signal is in general not equivalent to reversing it. You might be thinking about the fact that a Fourier transform of a real signal has Hermitian symmetry, i.e. X*(f) = X(-f). The passage you quoted from Wikipedia is correct; in convolution, you reverse the signal, whereas you don't in correlation. Jason
On Jul 16, 5:51 am, peterb...@gmail.com wrote:
> >From Wikipedia:http://en.wikipedia.org/wiki/Cross_correlation > > "The cross-correlation is similar in nature to the convolution of two > functions. Whereas convolution involves reversing a signal, then > shifting it and multiplying by another signal, correlation only > involves shifting it and multiplying (no reversing)." > > This seems wrong to me because cross correlation is the one with the > complex conjugate, which is equivalent to reversing the signal, and > convolution is the one with no conjugate. > Maybe I've misunderstood something. > > Peter Bone
Think of this way, in cross correlation you are trying to determine the similarity between two sequences by analyzing each of them point by point and summing up the total, so reversing one of them wouldn't make much sense
> Think of this way, in cross correlation you are trying to determine > the similarity between two sequences by analyzing each of them point > by point and summing up the total, so reversing one of them wouldn't > make much sense
Yes, that does make sense and I have thought of it that way before. In that case I'm confused about the use of complex conjugate as I thought this is equivalent to reversing the signal in the time / space domain. This is proven by an experiment I did. Firstly, I fourier transformed 2 signals and multiplied one by the conjugate of the other and inverse transformed the result. Secondly, I reversed one of the signals in the time / space domain, then fourier transformed both signals, multiplied them together without any conjugation and then inverse fourier transformed the result. The results were the same from both methods. Maybe there's something going on in the multiplication in the frequency domain that is equivalent to reversing one of the signals with respect to the other. Can anyone offer a good explanation as I've struggled to understand this for years. Peter
peterbone@gmail.com wrote:
>>From Wikipedia: http://en.wikipedia.org/wiki/Cross_correlation > > "The cross-correlation is similar in nature to the convolution of two > functions. Whereas convolution involves reversing a signal, then > shifting it and multiplying by another signal, correlation only > involves shifting it and multiplying (no reversing)." > > This seems wrong to me because cross correlation is the one with the > complex conjugate, which is equivalent to reversing the signal, and > convolution is the one with no conjugate. > Maybe I've misunderstood something. > > Peter Bone
Given two sequences abc and xyz, their (linear) convolution is a*x + (a*y + b*x) + (a*z + b*y + c*x) + (b*z + c*y) + c*z Writing the sequences on separate strips of paper, one forward and one reversed, will show those associations in turn as the strips are moved past one another. That is what your quotation tries to communicate. Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
On Jul 16, 12:03 pm, peterb...@gmail.com wrote:
> > Think of this way, in cross correlation you are trying to determine > > the similarity between two sequences by analyzing each of them point > > by point and summing up the total, so reversing one of them wouldn't > > make much sense > > Yes, that does make sense and I have thought of it that way before. In > that case I'm confused about the use of complex conjugate as I thought > this is equivalent to reversing the signal in the time / space domain.
only if f(t) is real does F(-w) = F'(w) where F'(w) is the complex conjugate of F
On Jul 16, 12:03 pm, peterb...@gmail.com wrote:
> > Think of this way, in cross correlation you are trying to determine > > the similarity between two sequences by analyzing each of them point > > by point and summing up the total, so reversing one of them wouldn't > > make much sense > > Yes, that does make sense and I have thought of it that way before. In > that case I'm confused about the use of complex conjugate as I thought > this is equivalent to reversing the signal in the time / space domain. > This is proven by an experiment I did. Firstly, I fourier transformed > 2 signals and multiplied one by the conjugate of the other and inverse > transformed the result. Secondly, I reversed one of the signals in the > time / space domain, then fourier transformed both signals, multiplied > them together without any conjugation and then inverse fourier > transformed the result. The results were the same from both methods. > Maybe there's something going on in the multiplication in the > frequency domain that is equivalent to reversing one of the signals > with respect to the other. Can anyone offer a good explanation as I've > struggled to understand this for years. > Peter
You're mixing up multiple concepts here. What the Wikipedia article was talking about is cross-correlation and convolution, nothing more. What you're talking about is a combination of convolution and Fourier domain properties. Take out all Fourier transform ideas from the situation, and you'll find that the definitions given in that article are correct. You're inserting some Fourier properties here that aren't relevant to the discussion, namely: f(-t) <==> F*(w) F(-w) = F*(w), if f(t) is real Again, the definitions of cross-correlation and convolution are much more general than the situation you're looking at; they are not reliant upon Fourier transform theory or anything of the sort. While there might be some nice relations involving convolution, correlation, and Fourier transform properties, they are in fact separate topics. Jason