0% found this document useful (0 votes)
8 views5 pages

Edge Detection Using Fuzzy Inference Rules and First Order Derivation

This paper presents a novel edge detection method for digital images using fuzzy inference rules and first order derivation, aiming to improve accuracy in detecting edges with low gray level differences. The proposed method operates without requiring a threshold value or training algorithm, utilizing a fuzzy inference system with six inputs and eleven rules to classify pixels as edges. Experimental results demonstrate that this approach yields more accurate and detailed edge detection compared to traditional methods like Canny and Prewitt.

Uploaded by

HALO ACA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views5 pages

Edge Detection Using Fuzzy Inference Rules and First Order Derivation

This paper presents a novel edge detection method for digital images using fuzzy inference rules and first order derivation, aiming to improve accuracy in detecting edges with low gray level differences. The proposed method operates without requiring a threshold value or training algorithm, utilizing a fuzzy inference system with six inputs and eleven rules to classify pixels as edges. Experimental results demonstrate that this approach yields more accurate and detailed edge detection compared to traditional methods like Canny and Prewitt.

Uploaded by

HALO ACA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

2013 13th Iranian Conference on Fuzzy Systems (IFSC)

Edge Detection Using Fuzzy Inference Rules and


First Order Derivation

Mahdiyeh Alimohammadi, Javad Pourdeilami and Ali A. Pouyan


School of Computer engineering and Information Technology
University of Shahrood
Shahrood, Iran
[email protected], [email protected], [email protected]

Abstract—The edge detection in digital images based on fuzzy preferable. Some other applications just need to know the
inference system has become popular in recent years. Several boundaries of the image objects. So the applicable method
reasons can be mentioned for that, from ambiguous definition of must ignore edges caused by depth discontinuity and surface
edges to inherent uncertainty of digital images. So, this paper orientation discontinuity in objects with non-uniform texture.
proposes a novel method based on fuzzy inference rules and first The current paper aims to propose an efficient method for the
order derivation for edge detection in digital images. The fuzzy former applications.
system of proposed approach consists of six inputs and eleven
rules. This method is able to detect edges with low difference in Applying linear time-invariant (LTI) to the edge detection
gray level. Furthermore, the proposed method is robust at problem is the most common used procedure which also results
detection of edges which are created by depth discontinuity, in the least computational complexity. Earlier edge detection
surface orientation discontinuity, reflectance discontinuity, and methods, such as Sobel [2] and Perwitt [3] are based on spatial
illumination discontinuity. No threshold value has been derivative filtering that calculates the intensity gradient
determined and membership functions of the fuzzy interface magnitude at each image pixel to only detect edges of certain
system are equable for all images. According to visual view and orientations. Then this gradient value is compared to a
assessment metrics we show that detected edges by proposed threshold. A pixel location is classified as edge when its
method are more accurate and narrow in comparison with some gradient value is higher than the threshold. The main drawback
of common and standard methods. of gradient-based edge detectors is that they suffer when the
Keywords—fuzzy edge detection; fuzzy inference system; fuzzy
edges are noisy, blurred and not flexible. They also need a
rules; first order derivation threshold value to be determined. To reduce the noise, most
algorithms that apply local first order and second order
derivative operator to detect edges are followed by some noise
I. INTRODUCTION removal methods. To solve the noise problem, Canny [4]
As digital images present a discretization of the reality, proposed a method which in the image is convolved with first
some inherent uncertainty of them is inevitable. This lack order derivatives of a Gaussian smoothing function followed
shows itself in the position of the image objects and the by thresholding. Research [5] illustrates that methods such as
intensity of each pixel. Furthermore, some contamination Canny which involve Gaussian filtering suffer from edge
source such as noise can affect the exactitude of the data. These displacement, vanishing edges and false edges. The Laplacian
problems have an impact on any possible operation of the edge detection method is proposed by using a 2D linear filter to
image. So, even the simplest operation has to account for some approximate second order derivatives of the image pixel
uncertainty. Edge detection is a very good example among all values. The classic methods work well when image contrast is
the possible operations. That is because even two human high. In other words, they show good results within regions of
experts do not detect boundary between two objects exactly an image that can be converted into binary with a simple
alike. Considering the inherent uncertainty of digital images, thresholding. But they are not accurate when an edge, although
fuzzy logic can be a suitable solution for both representation definite and clearly visible to human eyes, represents only a
and processing of edges. smallish gray-scale jump. Moreover, methods like [6] that
apply simple scan line approach are not able to detect all the
Usually, edges which are one of the most important edges because they are limited to trace only the horizontal and
features of images are defined as significant changes in image vertical neighbors of a point.
intensity. According to [1] four edge profiles exist: step, ramp,
ridge and roof. Edge detection can be useful in many image Edge detection is an extremely important step that can
processing and machine vision applications. In some facilitate higher-level image analysis by extracting useful
applications there is a need to detect regions with significant features including corners, lines and curves. Therefore, it
changes in intensity. Therefore, a method that is robust against remains an area of active research, with new approaches
depth discontinuity, surface orientation discontinuity, continually being developed. In this paper a novel method
reflectance discontinuity and illumination discontinuity is based on fuzzy inference rules approach and first order

978-1-4799-1228-5/13/$31.00 ©2013 IEEE.


derivation is proposed for edge detection in digital images In order to detect the edges in images, we designed a Fuzzy
without determining threshold value or need training Inference System (FIS) without determining the threshold
algorithm. value or need training algorithm using MATLAB toolbox. For
each pixel in the image, edge value is calculated by using a
The remainder of the paper is structured as follows. In window mask that slides over the image horizontally pixel by
section II we review different approaches to edge detection pixel. FIS is implemented by inputs fuzzification (convert into
with and without fuzzy logic. Then, in section III we introduce fuzzy plane) and then some fuzzy rules are explained that are
the proposed method. Section IV includes the experimental dealing with the vertical, horizontal and diagonal direction
results in the context of two assessment metrics. To finish, lines and are used for marking the considered pixel as edge. In
section V includes some brief conclusions. this system Mamdani method is selected as the defuzzification
method and output of the system is calculated as the centroid of
II. RELATED WORKS the resulting membership functions.
Many techniques have been proposed by researchers in the The first step of the FIS implementation is input
past based on fuzzy logic for edge detection in digital images fuzzification with definition of membership functions. The
[7-19]. In [7], Zhao, et al. proposed a method based on choice of membership function is problem dependent. In our
partitioning the image into 3-fuzzy regions and applying system, inputs are fuzzified using triangular and trapezoidal
principle of maximum entropy to find parameters value that membership functions because these functions have better
result best edge detection. They derived necessary condition performance. Equations (1) and (2) define these functions
for the entropy function to reach its maximum. This condition respectively. In (1) the parameters a and c locate the "feet" of
is used to obtain an effective three-level thresholding the triangle and the parameter b locates the peak and in (2) the
algorithm. Bloch, et al. [8] proposed a fuzzy set for edge parameters a and d locate the feet of the trapezoid and the
detection using morphological operations. Several methods parameters b and c locate the shoulders.
have been proposed based on fuzzy rules. Most of them
assume adjacent pixels around a center pixel in some classes.
⎛ x −a c −x ⎞ ⎞
Then use some appropriate membership functions defined for Trimf ( x ; a , b , c ) = max ⎜ min ⎛⎜ , ⎟, 0⎟
(1)
each class to implement fuzzy inference system which extracts ⎝ ⎝ − a c −b ⎠ ⎠
b
the edges. Russo, et al. [9] utilized fuzzy rule based approach
for edge detection. The drawback of this method is that it ⎛ ⎞ ⎞
( x ; a, b , c , d ) = max ⎜ min ⎛⎜
x −a d −x (2)
neglects the global information. In [10] adjacent pixels are Trapmf ,1, ⎟,0⎟
⎝ ⎝ b −a d −c ⎠ ⎠
assumed as 3×3 sets around a considered pixel. This method
uses five fuzzy rules to investigate discontinuity of adjacent
The proposed method consists of two trapezoidal and one
point around a specific pixel. The pixel is assumed as edge
triangular membership functions. The median values between
when this difference is similar to one of predefined sets. The
black and white values are important for edge detection. So, a
proposed method by Mansoori, et al. [11] considers adjacent
section is considered for these values that causes better result.
pixels of each pixel in six different sets. Then it uses
Fig. 2 shows these three functions that are called “black”,
appropriate bell shape membership functions to determine
“mid” and “white”.
membership value for each set. Finally, existence of edges is
determined by considering the membership values and
applying fuzzy rules.

III. PROPOSED METHOD


Edges are significant gray level changes or high frequency
components in images. A high-pass filter can detect edges in an
image. But frequency domain operations have computational
complexity. So most of edge detection techniques are based on
spatial domain. On the spatial domain, an edge can be detected
via first or second order derivative. Methods based on Second Fig. 2. Input membership functions
order derivative are highly sensitive to noises so first order
derivative has been used for edge detection [20]. In our After inputs fuzzification a set of rules are evaluated to
method, we compute first order derivative for each pixel in six achieve the output. We define eleven rules that operate on six
directions with a 2×2 window. These derivations are used as inputs and generate an output as edge value in pixel four.
inputs for fuzzy system. Fig. 1 shows how these six inputs are These rules are defined as following:
computed for each pixel. 1. If (D1 is black) and (D2 is white) then edge
P1 P3 D1=|P1-P2| D2=|P3-P4| D3=|P1-P3| 2. If (D3 is black) and (D4 is white) then edge
P2 P4 D4=|P2-P4| D5=|P2-P3| D6=|P1-P4| 3. If (D1 is not black) and (D2 is not black) then edge
Fig. 1. First order derivative computation with a 2×2 window 4. If (D2 is white) and (D6 is white) then edge
5. If (D3 is not black) and (D4 is not black) then edge
6. If (D1 is white) and (D2 is black) then edge
Main 2*2 win mask slopping on the
7. If (D3 is white) and (D4 is black) then edge
original image
8. If (D1 is white) and (D5 is white) then edge
9. If (D5 is white) and (D6 is black) then edge D1

10. If (D5 is black) and (D6 is white) then edge D2

11. If (D5 is black) and (D6 is white) then edge D6


D5 D4
Input image D3
The output of applying these rules is fuzzy too. The final
output of the FIS as defuzzification is presented to get two
values between 0 and 255. We define a triangular membership Extract the image mask features
function for the output with the name “edge” that is shown in D1 . . . D6
Fig. 3.

Fuzzy rule based system

Set output in P4 position

Convert 2 result colors into black


and white colors

Fig. 3. Output membership function

After defuzzification, the binary edge image is generated


from the output image of FIS. In order to extract edges with
narrow, curve and one-pixel lines, we apply thinning method as
canny edge detection algorithm. The “thin” operator from
morphological set is a suitable one for this purpose. Thinning with
morphology
All of the required steps in the proposed method are
summarized in the following and Fig. 4 shows the block
diagram of our method.
1. Read gray image X with dimensions M×N.
2. For each window on image:
a. Set the initial 2×2 mask as P1, P2, P3 and P4 and
Output image
calculate FIS inputs as D1, D2, D3, D4, D5 and D6.
b. Map input pixels to FIS for fuzzification using input Fig. 4. Block diagram of proposed method
membership functions.
c. Apply AND operator as Fuzzy t-norms operator IV. EXPERIMENTAL RESULTS
(MIN operator).
To evaluate edge detection methods one approach is visual
d. Fire fuzzy rules. assessment from different images and another approach is
e. Generate aggregated output with applying s-norms using assessment metrics. We prove the robustness of proposed
(MAX operator). method using both of these assessment metrics in comparison
with Canny, Prewitt, LOG and the Bhagabati & Das method
f. Defuzzify the output using centroid method and get proposed in [15]. The best threshold value is adjusted for the
the crisp P4 output pixel. classic methods which need a threshold to detect image edges.
g. If calculated pixel isn’t last pixel in image X, slide So it is assured that the proposed method is compared with the
the window to the next pixel and goto step 2, otherwise goto best results of classic methods.
step 3. We intend to extract accurate edges while they are more
3. Convert output image with two gray levels to black detailed. Therefore, we use Shannon’s entropy [21] as the first
and white image. criterion for comparison. The information content of the output
4. Apply thinning process with “thin” morphological image is measured using Shannon’s entropy function and it
operators for one-pixel edge extraction. results the indefiniteness in an image. This criterion is
5. End calculated by (3) [22].
L our proposed method and some of the common and standard
H ( I ) = ∑ p i log p i (3)
− i =0 methods. According to the results of FOM measure
assessment, detected edges in our method is more similar to
Where, I is image, pi is the frequency of pixels with Prewitt that have a good operation for extraction of detailed
intensity i. High entropy value specifies more randomness in edges.
edge image and so resultant image isn’t appropriate. In
addition to this threat, if a method exposes incomplete edges
TABLE II. FOM MEASURES OF PROPOSED METHOD AGAINST STANDARD
without details, value of entropy is low. Therefore another EDGE DETCTION METHODS
criterion or visual assessment beside on entropy is necessary.
Table I shows the entropy values for different methods on Image Canny Prewitt LOG
various images.
House 0.8381 0.9235 0.8241
TABLE I. ENTROPY FOR DIFFERENT EDGE DETECTOR METHODS Child 0.8192 0.9161 0.8337
Bhagabati Proposed Flower 0.8495 0.9339 0.7915
Image Canny Prewitt LOG
& Das [15] method
House 0.3282 0.3105 0.2895 0.2846 0.2996
Finally, visual assessment of proposed method is illustrated
Child 0.3349 0.3134 0.2860 0.3536 0.2914 in different images. Figures 5, 6 and 7 show the resultant
Flower 0.2289 0.2156 0.1967 0.1549 0.2119 images produced by proposed method in comparison with
Canny, Prewitt, LOG and Bhagabati & Das method. Random
threshold for these common and standard methods (Canny,
The reason of low entropy in Bhagabati & Das method is Prewitt and LOG) isn’t a fairly way for comparison. Therefore
incomplete edges as we will show in visual assessment. So it’s tthreshold adjustment is used to be sure that the best result of
not necessary for further investigation of this method. LOG standard methods are achieved. Bhagabati & Das method has a
edge detector has the least value of entropy among standard good result for binary images as we see in paper results of [15]
and common edge detection methods for all of the images and and incomplete edges for natural images in this paper.
can be seen that it extract most appropriate edges according to As a general conclusion, using proposed method has a good
this measure assessment. The proposed method shows better performance and in some cases better performance in terms of
performance over Canny and Prewitt edge detectors based on visual assessment, entropy and FOM metric beside that unlike
this criterion. It is evident from the results that our method standard methods it doesn’t need threshold adjustment.
finds meaningful edges in most images and unlike other three
methods don’t need threshold adjustment.
Since different edge detection methods are suitable for
various applications, we can’t specify a unique standard image
as a base for investigating of proposed method against other
methods and for this purpose we should introduce our method
in a specific domain. Therefore in this paper we specify the
proposed method is closer to which one of the common
methods for using this method in those specific applications.
For this purpose another criterion that is investigated is the
Figure Of Merit (FOM), one of the most used methods that can a b c
show a better comparison. FOM provides a normalized metric
in the range of [0,1] and increases with the quality of the
detection. FOM is calculated by (4).

N FP
1 1
FOM = ∑ (4)
max( N RE , N DE ) i =1 1 + d (i ) 2 p

NRE is number of edges in standard edge image, NDE is d e f


number of edges in proposed method, NFP is the number of Fig. 5. House image, a)Original, b)Canny, c)Prewitt, d)Bhagabati & Das,
pixels incorrectly defined as edge pixels or false positive edges, e)LOG f)proposed method
d(i) is the distance from the i’th false detected pixel in our
method to the nearest pixel that belonging to the misclassified
class and p is a scaling constant that normally its value is 1. We
use this metric for matching degree evaluation between our
method in one side and the methods mentioned above in
another side. Table II shows FOM measure calculated between
REFERENCES
[1] R. C. Gonzalez and R. E. Wood, “Digital Image Processing”, 3rd Ed.,
Prentice Hall, 2009.
[2] I. Sobel and G. Feldman, “A 3×3 isotropic gradient operator for image
processing”, presented at a talk at the Stanford Artificial Intelligence
Project, 1968.
[3] J. M. S. Prewitt, “Object enhancement and extraction”, Picture
Processing and Psychopictorics, Academic Press, pp. 75-149, 1970.
[4] J. F. Canny, “A Computational approach to edge detection”, IEEE
a b c Transaction on Pattern Analysis and Machine Intelligence, pp. 679-698,
1986.
[5] M. Basu, “Gaussian-based edge detection methods-A survey”, In
proceedings of IEEE Transactions on systems, man and cybernetics-Part
C: Applications and reviews, Vol. 32, No. 3, 2002.
[6] X. Jiang and H. Bunke, “Edge detection in range images based on scan
line approximation”, Computer Vision and Image Understanding Vol.
73, No. 2, pp. 183-199, 1999.
[7] M. Zhao, A. M. N. Fu, and H. Yan, “A technique of three level
thresholding based on probability partition a fuzzy 3-partition”. IEEE
Transaction On Fuzzy Systems, Vol.9, No.3, pp. 469- 479, 2001.
d e f [8] I. Bloch, “Fuzzy sets in image processing”, ACM Symposium on Allied
Computing, 1994.
[9] F. Russo and G. Ramponi, “Edge extraction by FIRE operators”, Proc.
Fig. 6. Child image, a)Original, b)Canny, c)Prewitt, d)LOG, e)Bhagabati & of the 3rd IEEE Conference on Fuzzy Systems, pp. 249-253, 1994.
Das, f)proposed method
[10] L. Liang and C. Looney, “Competitive fuzzy edge detection”, Applied
Soft Computing, pp. 123-137, 2003.
[11] G. Mansoori and H. Eghbali, “Heuristic edge detection using fuzzy
rule-based classifier”, Journal of Intelligent and Fuzzy Systems, Vol.17,
No.5, pp. 457-469, 2006.
[12] K. Cheung and W. Chan, "Fuzzy one–mean algorithm for edge
detection", IEEE Inter. Conf. On Fuzzy Systems, pp. 2039-2044, 1995.
[13] Y. Kuo, C. Lee, and C. Liu, "A new fuzzy edge detection method for
image nhancement", IEEE Inter. Conf. on Fuzzy Systems, pp. 1069-
1074, 1997.
[14] S. El-Khamy, N. El-Yamany, and M. Lotfy, "A modified fuzzy sobel
a b c edge detector", Seventeenth National Radio Science Conference,
February 22-24, Minufia, Egypt, 2000.
[15] B. Bhagabati and C. Das, “Edge detection of digital images using fuzzy
rule based technique”, International Journal of Advanced Research in
Computer Science and Software Engineering, Vol. 2, pp. 259-262, 2012.
[16] A. A. Alshennawy, and A. A. Aly, “Edge detection in digital images
using fuzzy logic technique”, World Academy of science, engineering
and technology, pp. 178-186, 2009.
[17] A. DO, “Fuzzy Logic Based Digital Image Edge Detection”, Global
Journal of Computer Science and Technology, 2010.
[18] D. O. Aborisade, “Novel Fuzzy logic Based Edge Detection Technique”,
d e f
International Journal of Advanced Science and Technology, pp. 75-82,
2011.
Fig. 7. Flower image, a)Original, b)Canny, c)Prewitt, d)LOG, e)Bhagabati &
[19] F. A. Tab, and O. K. Shahryari, “Fuzzy edge detection based on pixel's
Das, f)proposed method
gradient and standard deviation values”, In Computer Science and
Information Technology, pp. 7-10, 2009.
V. CONCLUSION [20] Y. Becerikli and T. M. Karan, “A new fuzzy approach for edge
detection”, In Computational Intelligence and Bioinspired Systems pp.
There are different methods for edge detection in digital 943-951). Springer Berlin Heidelberg, 2005.
images. The results show that the proposed algorithm is a [21] C. E. Shannon, “A mathematical theory of communication”, Bell Syst.
suitable method whenever we need to detect edges created by Tech. J. 27, pp. 379–423, 1948.
significant changes in image intensity, depth and surface [22] O. P. Verma, M. Hanmandlu, P. Kumar, S. Chhabra, and A. Jindal, “A
orientation discontinuity. This is because of method ability to novel bacterial foraging technique for edge detection”, Pattern
recognition letters, pp. 1187-1196, 2011.
detect important and major details of images. In addition,
irrelevant and non-edge pixels are not existed in resultant
image. So the proposed method can be used in most of
applications such as image compression and steganography.
The assessment metrics prove that our method can show a
good result in comparison with earlier methods.

You might also like