Application of cross-correlation

August 14, 2010

During my studies in engineering, my curiosity often led me to explore the real-world applications of the concepts I was learning. This desire to see how theoretical concepts are applied in real life helped me gain a deeper understanding of the theory itself. I was able to connect the dots between theory and practice, making the concepts clearer and more meaningful to me.

Cross correlation for continuous signals

Equation of cross correlation for continuous signals If you have two signals, f(t) and 𝑔(𝑡), the cross-correlation between them is defined as

(fg)(τ)=f(t)g(t+τ)dt(f * g)(\tau) = \int_{-\infty}^{\infty} f(t) \cdot g(t + \tau) \, dt

Cross correlation for descreate time and descreate amplitude

Equation of cross correlation for continuous signals If you have two signals, f(t) and 𝑔(𝑡), the cross-correlation between them is defined as

rxy[k]=n=x[n]y[n+k]r_{xy}[k] = \sum_{n=-\infty}^{\infty} x[n] \cdot y[n+k]

Computing cross-correlation of two descreate signals in C

Applying the same to an audio signal

Input Audio signal 1

Input Audio signal 2

Applying cross correlation

Result

Object Tracking Using Cross Corelation

Object Tracking Using Cross Corelation

Object Tracking Using Cross Corelation


Profile picture

Written by Sagar Curious mind exploring the intersection of Physics, electronics, Information and everyday life. You can follow them on Twitter