Fuzzy Logic based Edge Detection Method for Image Processing

Received Nov 9, 2017 Revised Feb 22, 2018 Accepted Feb 28, 2018 Edge detection is the first step in image recognition systems in a digital image processing. An effective way to resolve many information from an image such depth, curves and its surface is by analyzing its edges, because that can elucidate these characteristic when color, texture, shade or light changes slightly. Thiscan lead to misconception image or vision as it based on faulty method. This work presentsa new fuzzy logic method with an implemention. The objective of this method is to improve the edge detection task. The results are comparable to similar techniques in particular for medical images because it does not take the uncertain part into its account. Keyword:


INTRODUCTION
In current meltimedia applications, it is an important task determining the difference between the backgrounds and the objects, and between every objects. Edges are one of the most important visual evidences in imaging. Thus, in order to extract an information of an object, the object"s edge should be known. An edge is described as the wide variation among many pixels within an image while the detection of the boundary among the objects and its background is known as edge detection.Therefore, detection gedges is an important operation in image processing. Edge detection method is very important due to its property to discover edge, its ability to separate between noise and edge and to find out edges in high uncertainty situations [1]- [4].
Fuzzy logic method has been used widely in many fields since ithas been introducedby Zadehin 1965 in a seminal article entitled "Fuzzy Sets" [5]. His main goal was that the natural language has irregularities which can be handled or shaped by using the fuzzy theory. The Fuzzy theory is highly dependent on statistics which change into fuzzy values by "fuzzification process". By separating any theory into intervals that can be using to elicit its continuous form from the discrete form.Thestenghts of fuzzy logic over other methods is the ability to think, solve and handle problems with human perspective rather than the traditional logics which are all about "1 and 0", "black and white" or "true and false".In the edge detection field, there are many methods that used to estimate edge of an image such as Canny, Sobel, Robert, Prewitt, Zero cross and Marr-Hilderith. Each method of those has its own procedures to get edge, for example, some of them as Sobel and Robert operate different masks over the original image to get the edge, while Marr-Hilderith method evaluates edge of an image depending on the Laplaceian of image.In order to evaluate the edge detection technology performance, it has selected several factors like the quality in numerous natures, noisy image or dealing with accurate details while take into account getting low probability of errors. By comparison, Canny method gets best performance over the rest of methods. Figure 1 shows a various Edge Detection Techniques.

Fuzzy logic applications in edge detection
Since the concept of Fuzzy logic was formulated, many researchers have accomplished a significant number of researches on this area in order to apply it in different areas such as edge detection, object recolonization, image segmentation, and as such. Various approaches have applied in [6]- [8].
In [9] the work done by dividing image into three levels. Using the two dissimilar techniques among possibility region and three fuzzy regions and also minimum entropy rule, a method to decide the parameters of greatest three fuzzy regions is projected. The needed condition for maximizing entropy function is also articulated. Based on this condition, an active process for three level thresholding is obtained.

Figure 1. Various Edge Detection Techniques
If-then rules method considers as the most common algorithm in edge detection algorithms based on fuzzy logic. Specifically, assuming neighbors pixels of the center pixel is the first step, then applying fuzzy system interference with a certain membership function that allows fuzzy edge detection to be more fixable. Moreover, restricting the function of fuzzy membership to detect edge allows rules to realize that the specific change among those pixels known as an edge.
In this work, we present an algorithm which is based on fuzzy logic. The fuzzy logic rules used are improved in order to detect edges from an image. We used 16 fuzzy tamplats, change their domain into fuzzy domain, then preproces byenlargingthe image in order to use the mask easily, discoveringhesitation degree or intuitionistic fuzzy index, discoveringout of the highestof the divergence value between every tamplaet and the original image, chosing the minimum divergence values from every pixelthat has been scanned, then we have to transform it back to the original domain (0 -255)and established the threshold.

FUZZY LOGIC TECHNIQUE
It can define fuzzy image processingas the whole assemblage of all methods that apprehend, represent and process the images, their segments and features as fuzzy sets. The most important steps on the fuzzy image processing; represent and processing are depend on the selected fuzzy technique and on the problem to be solved. Fuzzy image processing has three main stages: image fuzzification, modification of membership values, and, if needed, image defuzzification .The fuzzification and defuzzification steps are coding of image data (fuzzification) and decoding of the results (defuzzification). These steps make possible to process images with fuzzy technique. Therefore, the coding of image data (fuzzification) and decoding of the results (defuzzification) are the most important stages that provides us with the ability to handle the image with techniques as shown in Figure 2 [10].

Figure 2. Steps involved in Fuzzy image processing
The most effective elementof fuzzy image processing is that we can observe it in the middle stage, which is modification of membership values or we can call it the intelligence step, because this steps makes the difference between approached and another one. Fuzzy logic is characterized by a large variety of memberships function as shown in Figure 3, each one of them has its distinctive effect. Utilizing appropriate membership by fuzzy system inference is increased the effectiveness of the method. This method assumes the adjacent points of pixels then divide them into classes by using membership function [11]. An image to be handle in the fuzzy logic technology, it has to be converted as a gray level thenconvered it into a membership function (Fuzzification step) where its value can be readily adjusted by fuzzy technology. This could either be called a fuzzy clustering, a fuzzy rule-based approach ora fuzzy integration approach. Fuzzy image processing is essential to find out the uncertainty data. There are many advantages of image processing based on fuzzy logic such as: a. Fuzzy techniques are predominating tools in order to represent and processing an image. b. It provides us a way to handle and mange obscurity efficiency. c. The concept of the fuzzy logic is easy to be undersood. d. Fuzzy logic provides a huge flexibility. e. Fuzzy logic is effective even if the data was inaccurate. The reason why fuzzy logic is better than others, because everything is suffered from lacking of exactness while fuzzy logic structures its understanding with taking into account.
In several image processing applications, to handle various types of complexities such as object recognition and scene analysis, it is suggested to utilize the human logic according to if-then rules which can be offered by fuzzy sit theory and fuzzy logic. On the other hand, many reasons such randomness, ambiguity and vagueness lead to uncertainty in image processing result and data. Moreover, those uncertainties have a negative impact on image processing progress that leads to many difficulties [12], [13].

PROPOSED METHOD
In this paper, at first an input image is read and get its dimensions in 2D. Then, carrying out a 3x3 mask convolution, usingthe templates are shown in Figure 4.
These16 fuzzy templatesrepresenting the edge shapes of possibility dissimilar.Selecting templates to imitate the type and direction of edges that may occur. Templates are the example of the edges, which are also the images. "a", "b", and 0 characterize the pixels of the edge templates. The values of and are selected by experimental method. These values are fixed for all images. It is supplementary understand that if we increase the number of templates more than 16, there is no notable improvement in the edge results and if we decrease the number of templates, many edges will be missed. It is possible to say that with 16 templates we can almost detect all the edges. We center each center of the templates at position (i,j) over the image that will get processing. a. Finding hesitation degree or intuitionistic fuzzy index using the following relationship: b.
(1) Note: we put c = 1 or c=0.2 which is the hesitation constant for image as shown in images. c. Compute the intuitionistic fuzzy divergence (IFD) between each elements at template and the image window (same size as that of template) and pick the minimum IFD value using max-min relationship as follows : (2)

SIMULATION RESULTS
The proposed method used different images such as Rice, Umaralmukthar and Lena, it is clearly shown that the output is better appearance and easier to mark the edge of the image if we compare them to other methods such as canny edge detector. The simulation has been done by MATLAB software.
The result of the method are shown in Figure 5 to Figure

CONCLUSION
Fuzzy image processing is abeneficial technology of an edge detection and formulation of expert knowledge and the combination of imprecise information from different sources. It can be reported that the results of this algorithm showa good image detection as the medical images where the accuracy of edges is the main objective of the process. Moreover, in this method, the intuitionistic fuzzy set theory was used to threshold image and we get a better result as images shown. Advantage of this technique over the rest of fuzzy techniques is itsability to be adaptive by changingthe hesitation constant for the image or change the threshold level instead of having a constant method with constant rules as in many fuzzy methods.