- Open Access
- Total Downloads : 1809
- Authors : Fari Muhammad Abubakar
- Paper ID : IJERTV1IS9239
- Volume & Issue : Volume 01, Issue 09 (November 2012)
- Published (First Online): 29-11-2012
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License: This work is licensed under a Creative Commons Attribution 4.0 International License
Study Of Image Segmentation By Using Edge Detection Techniques
Fari Muhammad Abubakar
Department of Electronics Engineering
Tianjin University of Technology and Education (TUTE) Tianjin, P.R. China
Abstract
Image segmentation is an important problem in different fields of image processing and computer vision. Segmentation subdivides an image into its constituent regions or object. Image segmentation can be obtained by using various methods, some which are easier to achieve than others due to the need of high programming. Edge detection is the approach used most frequently for segmenting images based on abrupt (local) changes in intensity. The focus of this paper is an attempt to present the study of Sobel, Canny, Robert, Prewitt, LoG (Laplacian of Gaussian) edge detection techniques for the purpose of image segmentation and experimental results obtained using the MATLAB version 7.12.0.635 (R2011a) software is discussed highlighting the performance of each method.
Keywords: Image segmentation, Edge, Edge Detection, MATLAB.
-
Introduction
Image is formed in the eye and in the camera by the amount of illumination reflected by an object [1]. In computer vision, image processing is any form of signal processing for which the input is an image, such as photographs or frames of videos. The output of image processing can be either an image or a set of characteristics or parameters related to image. The image processing techniques like image restoration, image enhancement, image segmentation e.t.c. [2]. Also, segmentation refers to the process of partitioning a digital image into multiple segments (sets of pixels, also known as super pixels). Image segmentation is typically used
to locate objects and boundaries (lines, curves, edges etc.) in images. More precisely, image segmentation is the process of assigning a label to every pixel in an image such that pixels with the same label share certain visual characteristics. The result of image segmentation is a set of segments that collectively cover the entire image, or a set of contours extracted from the image [3].
The most essential features of an image are its edges. Intuitively, an edge is a set of connected pixels that lay on the boundary between two regions whose gray level has outstanding change. The edge can be located between objects and background or two objects. The edge detection is widely applied in areas like image recognition, image classification, image enhancement, and in pattern recognition in general. Applying gradient operators on images can result in image edges when the edge gradient values exceed some defined thresholds. In practice, digital images have edges that are blurred and noisy, with the degree of blurring determined principally by limitations in the focusing mechanism (e.g., lenses in the case of optical images), and noise level determined principally by the electronic components of the imaging system [4].
-
Image Segmentation
Image segmentation is a fundamental yet still challenging problem in computer vision and image processing. In particular, it is an essential process for many applications such as object recognition, target tracking, content-based image retrieval and medical image processing, etc. Generally speaking, the goal of image segmentation is to partition an image into a certain number of pieces which have coherent features (color, texture, etc.) and in the
meanwhile to group the meaningful pieces together for the convenience of perceiving [5].
Image segmentation is the process of partitioning a digital image into multiple regions or set of pixels. Essentially, in image, partitions are different objects which have the same texture or color. The image segmentation results are a set of regions that cover the entire image together and a set of contours extracted from the image. All of the pixels in a region are similar with respect to some characteristics such as color, intensity, or texture. Adjacent regions are considerably different with respect to the same individuality. The different approaches are (i) by finding boundaries between regions based on discontinuities in intensity levels,
(ii) thresholds based on the distribution of pixel properties, such as intensity values, and (iii) based on finding the problem being considered [6]. Segmentation could be used for object recognition, image compression, image editing etc.
-
Edge Models
Edge models are classified according to their intensity profiles. A step edge involves a transition between two intensity level levels occurring ideally over the distant of 1 pixel. Figure 1(a) shows a section of a vertical step and a horizontal intensity profile through the edge. Step edges occur, for example, in images generated by a computer for use in areas such as solid modelling and animation. These clean, ideal edges can occur over the distance of 1 pixel, provided that no additional processing (such as smoothing) is used to make them look real. Digital step edges are used frequently as edge models in algorithm development.
In practice, digital images have edges that are blurred and noisy, determined by limitations in the focusing mechanism and noise level determined by the electronic components of imaging system. In such situations, edges are more closely modelled as having an intensity ramp profile such as edge in Figure 1(b). The slope of the ramp is inversely proportional to the degree of blurring in the edge. It can be seen that in this model, there is no thin (1 pixel thick) path. Instead, an edge point which is now any point contained in the ramp, and an edge segment would then be a set of such points that are connected. A third model of an edge is called roof edge, having the characteristics illustrated in Figure 1(c). Roof edges are models of lines through a region, with the base (width) of a roof edge being determined by the thickness and sharpness of the line [4]. The figures below show the various edge models.
Figure 1(a): Step Edge with intensity profile
Figure 1(b): Ramp Edge with intensity profile
Figure 1(b): Roof Edge with intensity profile
-
Edge Detection Techniques
Edge Detection is one of the most commonly used operations in image analysis, and there are many techniques used in detecting edges in images. Edge detection refers to the process of identifying and locating sharp discontinuities in an image. The discontinuities are abrupt changes in pixel intensity which characterize boundaries of objects in a scene. Classical methods of edge detection involve convolving the image with an operator (a 2-D filter), which is constructed to be sensitive to large gradients in the image while returning values of zero in uniform regions. There are large numbers of edge detection operators available, each designed to be sensitive to certain type of edges. Variables involved in the selection of an edge detection operator include Edge orientation, Noise environment and Edge structure. The geometry of the operator determines a characteristic direction in which it is most sensitive to edges. Operators can be optimized to look for horizontal, vertical, or diagonal edges. Edge detection is difficult in noisy images, since both the noise and the edges contain high frequency content. Operators used on noisy images are typically larger in scope, so they can average enough data to discount localized noisy pixels [7]. The edge detection techniques
0
-1
+1
0
considered for the study include Sobel, Robert, Canny, Prewitt and LoG (Laplacian of Gaussian).
-
Sobel Edge Detection
The Sobel edge detection method was introduced by Sobel in 1970 (Rafael C. Gonzalez (2004)). The Sobel technique of edge detection for image segmentation finds edges using Sobel approximation derivative [6]. It performs a 2-D spatial gradient measurement on an image and so emphasizes regions of high spatial gradient that corresponds to edges. Typically it is used to find the approximate absolute gradient magnitude at each point in an input grayscale image [8]. The operator consist of a pair of 3×3 convolution mask, one mask is simply the other rotated by 90°. This is very similar to Robert Cross operator.
-1
-2
-1
0
0
0
+1
+2
+1
-1
0
+1
-2
0
+2
-1
0
+1
Gx Gy
Figure 2: Sobel convolution masks
These can then be combined together to find the absolute magnitude of gradient at each point and the orientation of the gradient. The gradient magnitude is given by;
Typically, an approximate magnitude is computed using;
|G| = |Gx| + |Gy|
which is much faster to compute. The angle of orientation of the edge (relative to the pixel grid) giving rise to the spatial gradient is given by;
= arctan(Gy /Gx)
-
Robert Cross Edge Detection
The Robert Cross operator performs a simple, quick to compute 2-D spatial gradient measurement on an image. Pixel values at each point in the output represent the estimated absolute magnitude of the spatial gradient of the input image at that point. The operator consists of a pair 2×2 convolution kernel as shown in the figure below. One kernel is simply the other rotated by 90° [9]. This is very similar to the Sobel operator.
-1
0
0
+1
Gx Gy
Figure 3: Masks used for Robert operator
These masks are designed to respond maximally to edges running at 45° to the pixel grid, one mask for each of the two perpendicular orientations. The kernels can be applied separately to the input image, to produce separate measurements of the gradient component in each orientation (call these Gx and Gy). These can then be combined together to find the absolute magnitude of the gradient at each point and the orientation of that gradient. The gradient magnitude is given by;
Typically, an approximate magnitude is computed using;
|G| = |Gx| + |Gy|
which is much faster to compute. The angle of orientation given rise to spatial gradient (relative to the pixel grid orientation) giving rise to the spatial gradient is given by;
= arctan(Gy /Gx) – 3/4
-
Canny Edge Detection
The current standard edge detection scheme widely used around the world is the Canny edge detector. This is the work John Canny did for his Masters degree in MIT in 1983. He treated edge detection as a signal processing problem and aimed to design the optimal edge detector. He formally specified an objective function to be optimised and used this to design the operator. The objective function was designed to achieve the following optimization constraints:
-
Maximize the signal to noise ratio to give good detection. This favours the marking of true positives.
-
Achieve good localization to accurately mark edges.
-
Minimize the number of responses to a single edge. This favours the identification of true negatives, that is, non-edges are not marked.
Canny also suggested using operators with multiple widths to detect edges. If any of the operators reliably detect an edge pixel, then that pixel is marked as an edge pixel. If multiple operators detect an edge pixel, then the smallest operator is chosen since it has the best localization [10]. The Canny Edge Detection algorithm consists of the following basic steps [4]:
-
Smooth the input image with a Gaussian filter
-
Compute the gradient magnitude and angle images
-
Apply non-maxima suppression to the gradient magnitude image.
-
Use double thresholding and connectivity analysis to detect and link edges
-
-
Prewitt Edge Detection
Prewitt operator [11] is similar to the Sobel operator and is used for detecting vertical and horizontal edges in images.
-1
0
+1
-1
0
+1
-1
0
+1
+1
+1
+1
0
0
0
-1
-1
-1
Gx Gy
Figure 4: Masks used for Prewitt operator
-
Laplacian of Gaussian (LoG)
This edge detector was invented by Marr and Hildreth (1980) who combined Gaussian filtering with the Laplacian. This algorithm is not used frequently in machine vision. Those who continued his way were Berzins (1984), Shah, Sood and Jain (1986), Huertas and Medioni (1986) [12]. The Laplacian is often applied to an image that has first been smoothed with something approximating a Gaussian Smoothing filter in order to reduce its sentivity to noise. The operator normally takes a single gray level image as input and produces another gray level image as output. The Laplacian L(x,y) of an image with pixel intensity values I(x,y) is given by [7];
-
-
Experimental Results
This section presents the performance of various edge detection techniques which include Sobel edge detector, Robert Cross edge detector, Canny edge detector, Prewitt edge detector and Laplacian of Gaussian (LoG) edge detector.
These edge detection techniques were performed and implemented using MATLAB version 7.12.0.635 (R2011a) on an image with pixel size of 700×523 taken in Tianjin University of
Technology and Education (TUTE), Tianjin P.R. China. The original image together with the result of the different edge detection techniques are shown in the figure below.
Original Sobel Roberts
Canny Prewitt LoG
Figure 5: Original image with various edge detection results
After applying these five edge detectors to the image, the experimental results indicated that, the edge map using Canny and LoG edge detectors are almost similar. It was also observed that the Prewitt and Sobel edge detectors produced almost the same edge map. Likewise, it was again observed that the edge map produced by Robert edge detector is much similar to Prewitt and Sobel than Canny and LoG detectors.
-
Conclusion
Image segmentation has become a very important task in todays scenario. In the present day world computer vision has become an interdisciplinary field and its applications can be found in any area be it medical, object recognition, electronics etc. Edge detection as a type of image segmentation, it is the initial step in the object recognition. This paper made an attempt to make a study on various edge detection techniques which are based on discontinuity intensity level. The performance of these techniques was carried out with an image using MATLAB version 7.12.0.635 (R2011a) software. From the experimental results, it was observed that, Canny and LoG edge detectors almost produce same edge map while
Prewitt and Sobel edge detectors produced similar edge maps. The edge map produced by Robert edge detector is much closer to Sobel and Prewitt than Canny and LoG edge detectors. It was observed that edge maps produced by Canny edge detector are etter than the other edge detectors making it as the technique that has the optimal performance. From the experiment performed, the study observed that, Canny result is the superior one when compared to the other detectors for the selected image since different edge detections work better under different conditions.
6. References
-
Ojo, J.A., and Aderina, S.A., Colour Face Image Database for Skin Segmentation, Face Detection, Recognition and Tracking of Black Faces Under Real- Life Situation, International Journal of Image Processing (IJIP), Vol. 4, Issue 6.
-
Amandeep, A., and Anju, Gupta., Simulink Model Based Image Segmentation, International Journal of Advanced Research in Computer Science and Software Engineering, Vol. 2, Issue 6, June 2012.
-
K.K. Singh, and A. Singh., A Study of Image Segmentation Algorithms for Different Types of Images, International Journal of Computer Science, Vol. 7, Issue 5, Sept. 2010.
-
R.G. Gonzalez and R.E. Woods, Digital Image Processing, 3rd ed. Publishing House of Electronics Industry, Beijing, pp. 722-724, 745
-
D.A. Forsyth and J. Ponce, Computer Vision: A Modern Approach, Prentice Hall, 2002
-
Muthukrishman, R. and M. Radha., Edge Detection Techniques for Image Segmentation, International Journal of Computer Science & Information Technology (IJCSIT), Vol. 3, No. 6, Dec. 2011.
-
R. Maini, and, Dr. H. Aggarwal, Study and Comparison of Various Image Edge Detection Techniques, International Journal of Image Processing (IJIP), Vol. 3, Issue 1.
-
http://www.cse.secs.oakland.edu/hanna/cse571W2005/Image Processing/sobel.pdf
-
L. G. Roberts. Machine perception of 3-D solids ser. Optical and Electro-Optical Information Processing. MIT Press, 1965.
-
Er.S. Mohanty, and Er. M. P. Sahoo, Edge Detection: A Comparison, Eastern Academy of Science & Technology, Bhubaneswar, Bhubaneswar Engineering College.
-
R. C. Gonzalez and R. E. Woods. Digital Image Processing. 2nd ed. Prentice Hall, 2002.