International Journal of Scientific & Engineering Research, Volume 5, Issue 9, September-2014 266
ISSN 2229-5518
Edge Detection Based on Fuzzy Logic
Sagar Samant, Mitali Salvi, Mohammed Husein Sabuwala
Abstract— Edge detection is an essential feature of digital image processing. It is an approach used most frequently in image segmentation based on abrupt changes in intensity. Edge pixels are pixels at which the intensity of an image function changes abruptly, and edges are sets of connected edge pixels. In this paper we propose a very simple but novel method for edge detection without determining threshold value. W e have developed a fuzzy inference system in MATLAB in order to get a simple fuzzy rule based edge detection technique. Here the pixel under comparison is basically compared in a cross fashion to its neighboring pixels. Depending on the level of intensity change in the corresponding pixel, the overall pixel binary level is adjusted and used for edge detection. The results thus obtained are compared to popular edge detection methods like Sobel and high pass filter. The execution time as well as the visual feasibility were examined and were found to be better.
Index Terms— Edge detection, fuzzy logic, intensity, MATLAB, pixel.
—————————— ——————————
The first question that arises in our mind when we think about fuzzy logic is that what is fuzzy logic and what makes it so important. To answer the first question, Fuzzy logic, in scientific terms, is a way of making computers work like humans. The need for fuzzy logic arises due to the fact that the physical world is highly uncertain in nature. The decisions taken vary according to a person’s discretion and the way they perceive the world. In such an uncertain world using crisp boundaries to arrive at decisions or using it or to represent data would mean losing the data or details related to it. To resolve the problems related with using crisp boundaries to analyse data, Lotfi .A .Zadeh came up with the concept of fuzzy logic.
Let us look for a practical example where we would encounter a rather imprecise data. For example when we ask a person about the temperature of a room to anyone the most likely expected answers would be it is hot or maybe its cold. In such a situation getting a precise output would be whimsical.
Similarly say we go according to crisp boundaries and say that any temperature below 15 degrees is cold i.e. if we give a definite boundary to it then that would very oddly imply that a temperature of 14.9 degrees is cold where as a temperature of 15.1 degrees is hot. That would only mean bitter absurdity.
————————————————
• Sagar Samant is currently pursuing bachelors degree program in EXTC
engineering in D J Sanghvi COE, India. E-mail: sagarsamant51@gmail.com
• Mitali Salvi is currently pursuing bachelors degree program in EXTC
engineering in D J Sanghvi COE, India. E-mail: mits.salvi93@gmail.com
• Mohammed Husein Sabuwala is currently pursuing bachelors degree program in EXTC engineering in D J Sanghvi COE, India. E-mail:
• mdhusein2012@gmail.com
Thus sometimes having indefinite boundaries would give better results than having a definite boundary. Thus arises the concept of membership functions which further strengthens the concept of fuzziness.
Sobels algorithm is a popular method used in edge detection which uses the principle of approximating the gradient of an image. The image, which is described as a function of intensity, is convolved with a filter in the horizontal and vertical directions. This approximation in the X and Y direction is shown in the following masks.
The masks are combined together to give the gradient of the image. This method is inexpensive in terms of computations.
This method being very similar to sobel operator highlights the regions of high spatial frequency. These regions are generally the edges of the object in question. Thus this method converts the image into gray scale image. The original image is convolved with the following masks.
IJSER © 2014 http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 5, Issue 9, September-2014 267
ISSN 2229-5518
This method was developed by Marr and Heredith. Also
known as the zero crossing detector it looks for places in the Laplacian of an image where the value of the Laplacian crosses zero. These places are generally the edges of an image. The image to be detected is first passed through a Laplacian of Gaussian filter. The Laplacian is usually used to determine whether a pixel is on the light or dark side of an edge.
The operator was developed by Judith Prewitt. The operator uses the same equations as Sobel but uses the constant c=1. The method uses a 3*3 mask which is convolved with the original image to calculate approximations of the derivatives.
WP2 B P1
B P1 WP2
B P1
WP2
WP2
B P1
WP2 B P1 WP3
This operator was designed for optimal edge detection. The Canny operator works in a multi-stage process. First the image is smoothed by a Gaussian convolution. Then the first order derivative of the image is taken to highlight the high spatial frequency regions. Edges give rise to ridges which are useful in
distinguishing the edges of the image. Critical suppression is
WP2
B P1
WP3
Fig. 2. Edge Detection Logic
applied to the gradient magnitude. The final stage is thresholding.
In our project we have come up with a simple yet effective way of detecting edges in an image. Basically a thing that differentiates an edge from the remaining image is the sudden change in intensity. We have used this fact to develop a program using MATLAB that checks for sudden variation in the intensity of a colored or a gray-scale image and gives the output. The computation time is satisfactory and the results are quite satisfactory.
Fig. 1. Fuzzy Inference System
In all the above diagrams, the pixel P1 denotes the pixel under
consideration. Here, B indicates intensity of the pixel under
consideration or intensity close to the pixel under consideration
and W denotes a pixel intensity which shows a significant
difference from the intensity of the pixel under consideration. The fuzzy inference system in each of the above cases will assign a white colour to the pixel P1 and black to the rest. In such a way, scanning the entire picture we will get edge traced version of the picture.
1. If (leftpixel is significantvariation) then (output is edge) (1)
2. If (rightpixel is significantvariation) then (output is edge) (1)
3. If (upperpixel is significantvariation) then (output is edge) (1)
4. If (lowerpixel is significantvariation) then (output is edge) (1)
5. If (leftdiagup is significantvariation) then (output is edge) (1)
6. If (leftdiaglow is significantvariation) then (output is edge) (1)
7. If (rightdiagup is significantvariation) then (output is edge) (1)
IJSER © 2014 http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 5, Issue 9, September-2014 268
ISSN 2229-5518
8. If (rightdiaglow is significantvariation) then (output is edge) (1)
NO SIGNIFICANT VARIATION, HENCE NO EDGE DETECTED
IJSER © 2014 http://www.ijser.org
International journal of Scientific & Engineering Research, Volume 5, Issue 9, September-2014
ISSN 2229-5518
Algoritlun:
269
ORIGINAL IMAGE
SOBEL OUTPUT
IJSER © 2014
OUR OUTPUT
International Journal of Scientific & Engineering Research, Volume 5, Issue 9, September-2014 270
ISSN 2229-5518
1. Edge detection can be used for numerous applications in which access to an article is to be restricted to a limited number of persons.
2. The edge detection offers several benefits including simplicity, convenience, security and accuracy.
3. The edge detection is an important in most image processing techniques. It can identify the area of image where large change in intensity occurs. These changes are associated with the physical boundary or edge in the scene from which the image is derived.
4. Adjustment of vision system parameters and image
processing algorithms for measurement of
miniature parts in automatic assembly.
5. Segmentation and edge detection of color images
using CIELAB color space and edge detectors.
6. Wavelet-based multi-resolution edge detection
utilizing gray level edge maps.
7. Edge detection in ultrasound imagery using the
instantaneous coefficient of variation.
8. Edge plane detection in spatio-temporal images by
using edge vector and edge reliability.
9. Application of edge detection in automated driving.
Fuzzy image processing is an important tool of an edge detection and formulation of expert knowledge and the combination of imprecise information from different sources. In this paper, the algorithm to find the edges associated with an image had been introduced which has been instrumental to abridge the concepts of artificial intelligence and digital image processing. Fuzzy if-then rules are used to modify the membership to one of low, medium, and high classes. These algorithms provide a better result compared to the other edge detection algorithm .This work may extend for bright and dark images because this algorithm only detects edges of a gray image. As we can see from the above results, the image is not yet fully edge detected and the results can be improved.
10. Sobel edge detection for matlab by Elif Aybar , Anahtar Kelimeler Sobel , Kenar Ýþleci , Kenar Bulma , Görüntü Isleme , Gradyan Matrisleri
11. Detection of Edges Using Fuzzy Inference System, International Journal of Innovative Research in Computer and Communication Engineering
12. Vol. 1, Issue 1, March 2013
13. Notes on edge detection by Trucco and Jain et al
14. Edge Detection of Digital Images Using Fuzzy Rule
Based Technique International Journal of Advanced
Research in Computer Science and Software
Engineering, Volume 2, Issue 6, June 2012
IJSER © 2014 http://www.ijser.org