Edge Detection

Summary

Edge detection is executed on an image by computing the gradient of the location of each of its pixel. Edge detection, as a gradient operator, applies lter mask on the digital image of interest. Fig. 1 shows two kinds of filter masks utilized, i.e., Prewitt and Sobel lter. The center pixel, of both two-dimensional array filters, is where we are computing the gradient of a pixel in a image.

Figure_1

In this paper, edge detection was performed on binary images by applying the filters. Additionally, this includes two filters (Figs. 1 & 2), derived from the previously mentioned filters, designed for detecting diagonal edges.

Figure_2

A 128×128 pixel binary synthetic image of letter ‘Z’ was created. Fig. 4 individually displays the horizontal and vertical gradient images of the Prewitt and Sobel operators. Filter masks were applied by using lter2, MATLAB’s built-in function. Notice that the diagonal edges were also detected as a result of the pixel per pixel evaluation of the method. Prewitt and Sobel filters obtained no significant/observable difference from one another. Combining the gradient operators of each filter produces the results in the third column. The combinatorial step produced edge appearance we are expecting.

Filters were also applied on a real image, which was binarized first to abrupt its discontinuities. Fig. 5 shows the results obtained. The figure below shows that the difference between results obtained from Prewitt and Sobel is negligible.

Figure_3

A filter mask, base from the previously mentioned filters, was designed such that it can detect diagonal gradients. Results for the synthetic and real image are shown in Fig. 6. See that vertical and horizontal gradients were included in the detection. As for the real image, although the edges are not well-defined, its quality encompasses what individual horizontal and vertical gradient operators can provide.

Figure_4Figure_5Figure_6

 

 

Reference

[1] R. C. Gonzalez and R. E. Woods, Digital image processing. New York, NY: Prentice Hall, 2008. Section 10.2.

Leave a comment