30-10-2012, 04:30 PM
Fuzzy Logic Based Image Edge Detection Algorithm in MATLAB
Fuzzy Logic Based Image.pdf (Size: 253.08 KB / Downloads: 108)
ABSTRACT
This paper reports the implementation, in MATLAB environment,
of a very simple but efficient fuzzy logic based algorithm to detect
the edges of an input image by scanning it throughout using a 2*2
pixel window. Also, a Graphical User Interface (GUI) in
MATLAB has been designed to aid the loading of the image, and
to display the resultant image at different intermediate levels of
processing. Threshold level for the image can be set from the
slider control of GUI. Fuzzy inference system designed has four
inputs, which corresponds to four pixels of instantaneous
scanning matrix, one output that tells whether the pixel under
consideration is “black”, “white” or “edge” pixel. Rule base
comprises of sixteen rules, which classify the target pixel.
Algorithm for the noise removal has been implemented at
different levels of processing. The resultant image from FIS is
subjected to first and second derivative to trace the edges of the
image and for their further refinement. The results of the
implemented algorithm has been compared with the standard edge
detection algorithm such as ‘Canny’, ‘Sobel’, ‘Prewit’ and
‘Roberts’. Main feature of the algorithm is that it has been
designed by the smallest possible mask i.e. 2*2 unlike 3*3 or
bigger masks found in the literature.
INTRODUCTION
Modern time is an era of technology in which we now believe in
the vision based intelligence. Penetration of computers into each
area of the market and living has forced the designers to add the
capability to see and analyze and to innovate more and more into
the area of electronic vision or image processing. At the level of
computational intelligence for electronic vision, many of the
algorithms have been developed to extract different types of
features from the image such as edges, segments and lot many
other types of image features. Edge detection is a terminology in
electronic vision, particularly in the areas of feature extraction, to
refer to algorithms which aim at identifying points in a digital
image at which the image brightness changes sharply or more
formally has discontinuities. The goal of edge detection is to
locate the pixels in the image that correspond to the edges of the
objects seen in the image. This is usually done with a first and/or
second derivative measurement following by a comparison with
threshold which marks the pixel as either belonging to an edge or
not. The result is a binary image which contains only the detected
edge pixels. The purpose of detecting sharp changes in image
brightness is to capture important events and changes in
properties of the world. Discontinuities in image brightness are
likely to correspond to discontinuities in depth, discontinuities in
surface orientation, changes in material properties or variations in
scene illumination.
NOISE REMOVAL
Noise removal is performed at different intermediate levels of
processing. The idea of noise removal is to remove the pixels
which have been falsely recognized as edge by the processing.
Size of the scanning mask for this task is 3*3 pixels window. 3*3
pixels mask is slid over the whole image pixel by pixel row wise
and the process continues till the time whole image is scanned for
unwanted edge pixels. Fig. 2 shows p5 as falsely marked edge
pixel as all the surrounding pixels i.e. p1, p2, p3, p4, p6, p7, p8 &
p9 are white. Such types of falsely marked edge pixels are
changed to White by the noise removal algorithm.
SIMULATION RESULTS
GUI designed for this application is shown in Fig. 11. Any of the
standard edge detection algorithms (Sobel, Canny, Prewit &
Roberts) can be selected for comparison from the List Box on
GUI. Threshold level setting is done through the slider control of
GUI. More the value of the slider, more of the edges will be
traced, however, noise will also be increased. The developed
fuzzy algorithm for image edge detection was tested for various
images and the outputs were compared to the existing edge
detection algorithms and it was observed that the outputs of this
algorithm provide much more distinct marked edges and thus
have better visual appearance than the standard existing. The
sample output shown below in Fig.5.(a-c) compares the “Sobel”
Edge detection algorithm and our fuzzy edge detection algorithm.
It can be observed that the output that has been generated by the
fuzzy method has found out the edges of the image more distinctly
as compared to the ones that have been found out by the “Sobel”
edge detection algorithm. Thus the Fuzzy rule based algorithm
provides better edge detection and has an exhaustive set of fuzzy
conditions which helps to extract the edges with a very high
efficiency.
CONCLUSIONS
In this paper, emphasis has been to develop a very simple & small
but a very efficient, fuzzy rule based edge detection algorithm to
abridge the concepts of artificial intelligence and digital image
processing. The algorithm and associated GUI has been developed
in MATLAB environment. Comparisons were made with the
various other edge detection algorithms that have already been
developed. Displayed results have shown the accuracy of the edge
detection using the fuzzy rule based algorithm over the other
algorithms. The fuzzy rule based algorithm has been successful in
obtaining the edges that are present in an image after the its
implementation and execution with various sets of images.
Sample outputs have been shown to make the readers understand
the accuracy of the algorithm. Thus developed algorithm exhibits
tremendous scope of application in various areas of digital image
processing.