Professional Documents
Culture Documents
Correlation
Correlation
CORRELATION
Definition
+∞
Γ𝑥𝑦 𝜏 = 𝑥 ∘ 𝑦 𝜏 = න 𝑥 𝑢 𝑦 ∗ 𝑢 + 𝜏 𝑑𝑢
−∞
+∞
=න 𝑥 𝑢 𝑦 ∗ 𝑢 − 𝜏 𝑑𝑢 = 𝑥(𝜏) ∘ 𝑦(𝜏)
−∞
+∞
∗
t=u- +∞
∗
+∞
∗
∗
∗
Γ𝑥𝑦 𝜏 = න 𝑥 𝑢 𝑦 𝑢 − 𝜏 𝑑𝑢 = න 𝑥 𝑡 + 𝜏 𝑦 𝑡 𝑑𝑡 = න 𝑦 𝑡 𝑥 𝑡 + 𝜏 𝑑𝑡 = Γ𝑦𝑥 −𝜏
−∞ −∞ −∞
Correlation
1 x(u) 1 x(u)
Graphical meaning
𝑦 𝑢 + 0.75 𝑦 𝑢 + 0.5
+∞
𝑥∘𝑦 𝜏 =න 𝑥 𝑢 𝑦 ∗ 𝑢 + 𝜏 𝑑𝑢 -0.75 -0.5 +0.5 -0.5 0 +0.5
−∞ +∞ +∞
න 𝑥 𝑢 𝑦 𝑢 + 0.75 𝑑𝑢 න 𝑥 𝑢 𝑦 𝑢 + 0.5 𝑑𝑢
x(u) −∞ −∞
1
Correlation
? Convolution
+∞
𝑥 𝜏 ∗𝑦 𝜏 =න 𝑥 𝑢 𝑦 ∗ 𝜏 − 𝑢 𝑑𝑢
−∞
𝑥 𝜏 ∘𝑦 𝜏 = 𝑥 𝜏 ∗ 𝑦 ∗ −𝜏
Proof:
From the Schwartz inequality, we have:
is even
When x(t)=y(t)
Is odd
Correlation
Discret version
Let use define two real sampled signals x and y of size N and M ( M<<N), respectively. Thus the
discret correlation is defined by:
𝑀
𝐸[ 2 ]
1
𝑥∘ℎ 𝑛 = 𝑥 𝑘+𝑛 𝑦 𝑘 , 𝑛 = [0, … , 𝑁]
𝑀
𝑀
𝑘=−𝐸[ ]
2
𝒏=𝟐
Example:
𝒌
Correlation
2D analogue version
Consider two real signals x and y . The analogue correlation is defined by:
+∞ +∞
Γ𝑥𝑦 𝜏, 𝜂 = 𝑥 ∘ 𝑦 𝜏, 𝜂 = න න 𝑥 𝑢, 𝑣 𝑦 ∗ 𝑢 + 𝜏, 𝑣 + 𝜂 𝑑𝑢 𝑑𝑣
−∞ −∞
Discret version
Let us define two 2D signal x and y composed of N*N and M*M coefficients, respectively (M<<N). Then
the discret 2D correlation is defined by:
𝑀 𝑀
𝐸[ 2 ] 𝐸[ 2 ]
1
𝑥 ∘ 𝑦 𝒏, 𝒎 = 2 𝑥 𝒏 + 𝑘, 𝒎 + 𝑙 𝑦 𝑘, 𝑙 , (𝑛, 𝑚) = [0, … , 𝑁]
𝑀
𝑀 𝑀
𝑘=−𝐸[ 2 ] 𝑙=−𝐸[ 2 ] Matlab : z=xcorr2(x,y)
Correlation
Illustration on images
convolution correlation
h y
x x (𝒙 ∘ 𝒚)(𝒏, 𝒎)
Correlation
Echo removing
• principle :
• Filter it
By zooming in, we can observe that echo appears at the 8820-th sample and its amplitude is
0.4 times the initial signal.
𝑥 𝑡 = 𝑥𝑒 𝑡 − 𝐾𝑥𝑒 𝑡 − ∆𝑡
By using this equation on the signal, we can remove the echo on the signal
before after
Correlation
o =