Professional Documents
Culture Documents
Filtering Edge Detection
Filtering Edge Detection
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
(c) Denoised Image: Box Kernel (d) Denoised Image: Gaussian Kernel
@f
= f (x + 1) f (x) (5)
@x
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
Gradient Operator
2 @I 3
@x
gx 4 5
rI = =
gy @I
@y
* Direction of Edge ✓ ◆
1 gy
✓ (x, y ) = tan
gx
(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
@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.
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