You are on page 1of 22

Advanced Driver Assistance System

Dr. Shree Prasad M.


Asst. Prof., Dept. of E.E.E.,
BITS Pilani
O↵-Campus, Bangalore.

Advanced Driver Assistance System 1 / 21 BITS Pilani, Pilani Campus


Outline

1 Image Low Pass Filtering

2 Image High Pass Filtering

Advanced Driver Assistance System 2 / 21 BITS Pilani, Pilani Campus


Image Low Pass Filtering: Blurring/Denoising

Corrupted Image Model


g (x, y ) = f (x, y ) + ⌘ (x, y ) (1)

* g (x, y ) : Noisy Image.


* f (x, y ) : Noiseless Image.
* ⌘ (x, y ) : Noise.

Image Enhancement, “pixel averaging”: Reduce the e↵ect of Noise.


Results in Image Blurring: Equivalent to integration.

Advanced Driver Assistance System 3 / 21 BITS Pilani, Pilani Campus


Image Low Pass Filtering: Box Kernel

Box Kernal
2 3
1 1 1 1 1
2 3
1 1 1 61 1 1 1 17
14 1 661
7
1 1 15 1 1 1 17
9 25 6
41
7
1 1 1 1 1 1 15
1 1 1 1 1

Advanced Driver Assistance System 4 / 21 BITS Pilani, Pilani Campus


Gaussian Function
1 1
(x µ 2
);
f (x) = p e 2 1<x <1 (2)
2⇡ 2

Figure 1: Average Marks µ = 50, and Standard Deviation = 10

Figure 2: Average Marks µ = 50, and Standard Deviation =5


Advanced Driver Assistance System 5 / 21 BITS Pilani, Pilani Campus
Image Low Pass Filtering Contd.

Low pass Gaussian filtering kernel


(x 2 +y 2 )
hG (x, y ) = Ke 2 2 ; `  x, y  ` (3)
(MK 1)
where ` =
2
1
K=
P̀ P̀ (x 2 +y 2 )
e 2 2
x= ` y = `

Gaussian Filter Kernel of Size 3 ⇥ 3


2 3
0.3679 0.6065 0.3679
1 4
0.6065 1 0.60655 (4)
4.8976
0.3679 0.6065 0.3679

Advanced Driver Assistance System 6 / 21 BITS Pilani, Pilani Campus


2D Gaussian Function

Advanced Driver Assistance System 7 / 21 BITS Pilani, Pilani Campus


Image Denoising Illustration

(a) Original Image (b) Noisy Image

(c) Denoised Image: Box Kernel (d) Denoised Image: Gaussian Kernel

Figure 3: Image Source: Cityscape Dataset.

Advanced Driver Assistance System 8 / 21 BITS Pilani, Pilani Campus


Image High Pass Filtering: Edge Enhancement

High pass filtering: Edge enhancement/ image sharpening.


Concept: Around neighbourhood of pixel (x, y )
* Same Intensity Values: No variation.
* Di↵erent Intensity Values: Variation.
Measuring variation: Di↵erencing (Di↵erentiation).
Di↵erent types of edge detection kernel
1. Gradient.
2. Laplacian.

Advanced Driver Assistance System 9 / 21 BITS Pilani, Pilani Campus


Derivatives: First Derivative

@f
= f (x + 1) f (x) (5)
@x

Advanced Driver Assistance System 10 / 21 BITS Pilani, Pilani Campus


Derivatives: First Derivative Contd.

Advanced Driver Assistance System 11 / 21 BITS Pilani, Pilani Campus


Derivatives: First Derivative Contd.

Advanced Driver Assistance System 12 / 21 BITS Pilani, Pilani Campus


Edge Intensity: First Derivative
Where is the edge?

Figure 4: Observation: Peaks at Edges.

Advanced Driver Assistance System 13 / 21 BITS Pilani, Pilani Campus


First Derivative: Edge Detection Operator

1 Prewitt Operator
2 3 2 3
1 1 1 1 0 1
hx (x, y ) = 4 0 0 0 5; hy (x, y ) = 4 1 0 15;
1 1 1 1 0 1
| {z } | {z }
@I @I
@x @y

2 Sobel Operator
2 3 2 3
1 2 1 1 0 1
hx (x, y ) = 4 0 0 0 5; hy (x, y ) = 4 2 0 25;
1 2 1 1 0 1
| {z } | {z }
@I @I
@x @y

Advanced Driver Assistance System 14 / 21 BITS Pilani, Pilani Campus


Edge Detection: Gradient Operator

Gradient Operator
2 @I 3
 @x
gx 4 5
rI = =
gy @I
@y

Magnitude and Direction of the Edge


* Magnitude of Edge q
M (x, y ) = gx2 + gy2

* Direction of Edge ✓ ◆
1 gy
✓ (x, y ) = tan
gx

Advanced Driver Assistance System 15 / 21 BITS Pilani, Pilani Campus


Edge Detection:Gradient Operator Illustration.

(a) Edge along x-axis (b) Edge along y-axis (c) Diagonal Edge

(a) Gradient along x-axis (b) Gradient along y-axis (c) Diagonal Gradient

Advanced Driver Assistance System 16 / 21 BITS Pilani, Pilani Campus


Derivatives: Second Derivative

@2f
= f (x + 1) + f (x 1) 2f (x) (6)
@x 2
Advanced Driver Assistance System 17 / 21 BITS Pilani, Pilani Campus
Derivatives: Second Derivative Contd.

Advanced Driver Assistance System 18 / 21 BITS Pilani, Pilani Campus


Derivatives: Second Derivative Contd.

Advanced Driver Assistance System 19 / 21 BITS Pilani, Pilani Campus


Edge Intensity:Second Derivative
Where is the edge?

Figure 7: Observation: Zero Crossing at Edges.


Advanced Driver Assistance System 20 / 21 BITS Pilani, Pilani Campus
Edge Detection: Laplacian Kernel

Laplacian Operator
2 @2f @2f
r f = + (7)
@x 2 @y 2

@2f
= f (x + 1, y ) + f (x 1, y ) 2f (x, y ) (8)
@x 2
@2f
= f (x, y + 1) + f (x, y 1) 2f (x, y ) (9)
@y 2

Laplacian Kernel
2 3 2 3
0 1 0 1 1 1
41 -4 15 (10) 41 -8 15 (11)
0 1 0 1 1 1
Advanced Driver Assistance System 21 / 21 BITS Pilani, Pilani Campus

You might also like