Image Processing Reference

In-Depth Information

Fig. 5.20
K1 and K2 are kernels, while T1 is a template

image is therefore smoothed using a Gaussian filter before the Laplacian is applied

to approximate the second order derivatives and looking for zero-crossings.

Another approach to finding 1-pixel thin edges is the Canny edge detector [5].

It first smooths the image using a Gaussian filter before applying the Sobel kernels.

From the Sobel kernels the direction of the gradient in each point is estimated. Next,

the principle of
non-maximum suppression
is applied. For each pixel the magnitude

of the gradient is compared with the magnitudes of the two nearest neighbors in the

gradient direction. The two smallest are deleted. Applying this to all pixels results

in 1-pixel thin edges. Finally a threshold is applied to prune edges with too small

magnitudes. If, however, an edge with a too small magnitude is connected
6
to a

pixel with a magnitude above another threshold value, then the edge is not pruned.

This allows for an adaptive pruning and is known as the principle of
hysteresis

thresholding
.

Sometimes template matching is preformed on binary edge images. If the shape

of the object in the image is slightly different from the input image, the template

matching will output a very low similarity even though the two objects might look

very similar. Therefore Chamfer matching [2] can be applied instead. Here the tem-

plate image is converted into an image where each pixel contains a value indicating

the distance to the nearest edge, see Sect. 6.4. Using such a distance-image as the

template will provide a much more stable result.

5.4

Exercises

Exercise 1:
Explain the following concepts: neighborhood processing, kernel, cor-

relation, border problem, image edge.

Exercise 2:
What is the role of the kernel size?

Exercise 3:
What is the normalization factor of the kernel K1 in Fig.
5.20
?

Exercise 4:
Apply a 3

×

3 median filter to the image in Fig.
5.20
.

6
Connectivity among pixels is discussed in Chap. 7.