Digital Signal Processing Reference
In-Depth Information
used. Of these kernels, Sobel convolution kernels are used for horizontal and vertical edge detection.
They are listed in the following:
Horizontal Sobel edge detector:
2
3
1 2 1
000
121
4
5
(14.12)
The kernel subtracts the first row in the kernel from the third row to detect the horizontal difference.
Vertical Sobel edge detector:
2
4
3
5
101
202
101
(14.13)
The kernel subtracts the first column in the kernel from the third column to detect the vertical
difference.
A Laplacian edge detector is devised to tackle both vertical and horizontal edges. It is described in
the following:
Laplacian edge detector:
2
3
010
1 41
010
4
5
(14.14)
EXAMPLE 14.9
Given the following 8-bit grayscale image, use the Sobel horizontal edge detector to detect horizontal edges:
2
4
3
5
100 100 100 100
110 110 110 110
100 100 100 100
100 100 100 100
100 100 100 100
5 4 original image :
Solution:
We pad the image with zeros before processing as follows:
0
00
0
0
0
0
100
100
100
100
0
0
0
0
0
0
110
110
110
110
100
100
100 100
100
100 100
100
0
100 100
100
100
0
0
0
00
000
Search WWH ::




Custom Search