# DCSP-17: Matched Filter Jianfeng Feng Department of Computer Science Warwick Univ., UK

## Presentation on theme: "DCSP-17: Matched Filter Jianfeng Feng Department of Computer Science Warwick Univ., UK"— Presentation transcript:

DCSP-17: Matched Filter Jianfeng Feng Department of Computer Science Warwick Univ., UK Jianfeng.feng@warwick.ac.uk

Filters Stop or allow to pass for certain signals as we have talked before Detect certain signals such as radar etc

Matched filters 0,0,0.0,0,0, 0,0,0,1,1,-1,1,-1, 0,0,0,0,0, 0,0,0,0,0, 0 At time 1

Matched filters 0,0,0.0,0,0, 0,0,0,1,1,-1,1,-1, 0,0,0,0,0, 0,0,0,0,0, 0 At time 2

Matched filters 0,0,0.0,0,0, 0,0,0,1,1,-1,1,-1, 0,0,0,0,0, 0,0,0,0,0, 0 At time 3

Matched filters X=( 0,0,0.0,0,0, 0,0,0,1,1,-1,1,-1, 0,0,0,0,0, 0,0,0,0,0, 0 …) To develop a filter to detect the arriving of the signal (1,1,-1,1,-1).

y(n)= a(0) x(n)+ a(1) x(n-1)+…+ a(N) x(n-N) find a = ( a(0),a(1),a(2),a(3),a(4) ) ???? X=( 0,0,0.0, 0, 0, 0, 0, 0, 1, 1, -1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0,0,0, 0 …) -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 at time zero, a tank or a flight is appeared and detected by a radar.

y(-9) = a(0) x(-9)+ a(1) x(-10)+ a(2) x(-11) + a(3) x(-12) +a(4) x(-13) = 0 y(-8) = a(0) x(-8)+ a(1) x(-9) + a(2) x(-10) +a(3) x(-11) +a(4) x(-12) = 0 … y(-4) = a(0) x(-4)+ a(1) x(-5) + a(2) x(-6) +a(3) x(-7) +a(4) x(-8) = a(0) y(-3) = a(0) x(-3)+ a(1) x(-4) + a(2) x(-5) +a(3) x(- 6) +a(4) x(-7) = a(0)+a(1) y(-2) = a(0) x(-2)+ a(1) x(-3) + a(2) x(-4) +a(3) x(-5) +a(4) x(-6) = -a(0)+a(1)+a(2) y(-1) = a(0) x(-1)+ a(1) x(-2) + a(2) x(-3) +a(3) x(-4) +a(4) x(-5) = a(0)-a(1)+a(2)+a(3) y(0) = a(0) x(0)+ a(1) x(-1) + a(2) x(-2) +a(3) x(-3) +a(4) x(-4) = -a(0)+a(1)-a(2)+a(3)+a(4) y(1 ) = a(0) x(1)+ a(1) x(0) + a(2) x(-1) +a(3) x(-2) +a(4) x(-3) = -a(1)+a(2)-a(3)+a(4) …..

We have The equality is true if and only if a (i) = x (-i)

Matched Filter A filter is called a matched filter for sequence s if Advantage: easy to implement and efficient Disadvantage: we know the exact signal we want to detect before hand. Also known as Linear correlation detector

6 8 4 3 2 1 0 -1 -2 -3 -4 -5 time

Question: Could you develop a matched filter to detect it? y (0) = a(0) x(0) + a(1) x(-1) + a(2) x(-2) + a(3) x(-3) +a(4) x(-4) + a(5)x(-5) = a(0) a(0) + a(1) a(1) +a(2)a(2) +a(3)a(3) + a(4)a(4)+a(5)a(5) 2ab <= a^2 + b^2 and the equality holds iff a=b

Correlation

r xx (0) r xx (1) X(1)X(8)X(9)X(10)X(11)X(12)X(3)X(4)X(5)X(6)X(7)X(2) X(1)X(8)X(9)X(10)X(11)X(12)X(3)X(4)X(5)X(6)X(7)X(2) X(1)X(8)X(9)X(10)X(11)X(12)X(3)X(4)X(5)X(6)X(7)X(2) X(1)X(8)X(9)X(10)X(11)X(12)X(3)X(4)X(5)X(6)X(7)X(2)

Correlation between two sequences

r xy (0) r xy (1) X(1)X(8)X(9)X(10)X(11)X(12)X(3)X(4)X(5)X(6)X(7)X(2) y(1)y(8)y(9)y(10)y(11)y(12)y(3)y(4)y(5)y(6)y(7)y(2) X(1)X(8)X(9)X(10)X(11)X(12)X(3)X(4)X(5)X(6)X(7)X(2) y(1)y(8)y(9)y(10)y(11)y(12)y(3)y(4)y(5)y(6)y(7)y(2)

Correlation measures the difference between two objects

D(X,Y)= 2 – 2 r XY (0) if we assume that ||X|| = || Y || =1.

Image Enhancement Contrast enhancement

Ideas: Look at the following two images, generated from the following Matlab code x1=abs(1*randn(205,232)); figure, imshow(x1); X2=(rand(205,232)); figure,imshow(x2);

12 3 4 grey level

12 3 4 grey level 1 2 3 4

Property For a random variable X, let F be its distribution function i.e. F(x) = P(X<= x) Then the distribution of F(X) is uniform P(F(X) <=x)=x

Histogram Equalization Note how the image is extremely grey; it lacks detail since the

Download ppt "DCSP-17: Matched Filter Jianfeng Feng Department of Computer Science Warwick Univ., UK"

Similar presentations