4.3 Second order edge detection operators
4.3.1 Motivation
First order edge detection is based on the premise that differentiation highlights change; image
intensity changes in the region of a feature boundary. The process is illustrated in Figure 4.22,
where Figure 4.22(a) is a cross-section through image data. The result of first order edge
detection, f
x = d f
dx in Figure 4.22(b), is a peak where the rate of change of the original
signal, fx in Figure 4.22(a), is greatest. There are higher order derivatives; applied to the
same cross-section of data, the second order derivative, f

x = d
2
f
dx
2
in Figure 4.22(c), is
greatest where the rate of change of the signal is greatest and zero when the rate of change is
constant. The rate of change is constant at the peak of the first order derivative. This is where
there is a zero-crossing in the second order derivative, where it changes sign. Accordingly, an
alternative to first order differentiation is to apply second order differentiation and then find
zero-crossings in the second order information.
0 2 4
–2
–1
1
2
6
f
(x
)
x
(a) Cross-section through image data
0 2 4
1
2
d
6
dx
f
(x
)
x
(b) First order edge detection
0 2 4
–1
1
d
2
6
dx
2
f
(x
)
x
(c) Second order edge detection
Figure 4.22 First and second order edge detection
4.3.2 Basic operators: the Laplacian
The Laplacian operator is a template which implements second order differencing. The second
order differential can be approximated by the difference between two adjacent first order
differences:
f

x f
x f
x +1 (4.24)
Low-level feature extraction (including edge detection) 137
which, by Equation 4.6, gives
f

x −fx +2fx +1 fx +2 (4.25)
This gives a horizontal second order template, as given in Figure 4.23.
–1 –12
Figure 4.23 Horizontal second order template
When the horizontal second order operator is combined with a vertical second order difference
we obtain the full Laplacian template, given in Figure 4.24. Essentially, this computes the
difference between a point and the average of its four direct neighbours. This was the operator
used earlier in anisotropic diffusion (Section 3.5.4), where it is an approximate solution to the
heat equation.
0
4
00
0
–1
–1
–1
–1
Figure 4.24 Laplacian edge detection operator
Application of the Laplacian operator to the image of the square is given in Figure 4.25.
The original image is provided in numeric form in Figure 4.25(a). The detected edges are the
zero-crossings in Figure 4.25(b) and can be seen to lie between the edge of the square and its
background.
p
=
1
2
3
4
1
2
1
2
2
0
1
2
0
2
3
3
38
40
43
39
0
4
0
39
44
44
41
2
1
1
37
41
40
42
2
1
2
36
42
39
40
3
2
2
3
2
1
2
1
1
1
0
1
3
0
1
02
131042
(a) Image data
(b) After Laplacian operator
L
=
0
0
0
0
0
0
0
0
0
31
70
34
47
72
44
0
0
47
37
12
8
37
38
0
0
36
31
1
6
45
40
0
0
32
60
50
33
74
31
0
0
0
28
39
42
34
6
0
0
0
0
0
0
0
0
0
0
1
42
37
45
5
0
44
Figure 4.25 Edge detection via the Laplacian operator
138 Feature Extraction and Image Processing

Get Feature Extraction & Image Processing, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.