• Nenhum resultado encontrado

Edge Detection in Grayscale Images Using Fuzzy Logic and Filter Disk

N/A
N/A
Protected

Academic year: 2017

Share "Edge Detection in Grayscale Images Using Fuzzy Logic and Filter Disk"

Copied!
9
0
0

Texto

(1)

15

Edge Detection in Grayscale Images Using Fuzzy

Logic and Filter Disk

MohammadAmin Edalatirad, S. Seddeghi chaharborj,Hamid Mehdi

1

Department of Computer Science, Dezful Branch, Islamic Azad University, Dezful, Iran 2

Department of Mathematics,Faculty of Science, University Putra Malaysia,43400 UPM, Malaysia

3

Department of Computer Science, Andimeshk Branch, Islamic Azad University, Andimeshk, Iran

1

edalati.a@Gmail.com

Abstract

In this paper, using fuzzy rules, a method is presented for edge detection in grayscale images. The proposed method is a fuzzy system and its membership function inputs are fed by the filter disc using a smoothed image. This membership function includes 8 inputs that obtain their values through the surveys of smoothed image pixels by a 3 × 3 mask; the system also includes an output that determines the amount of edge. In this method, for the classification of pixels and adjusting their results, 12 fuzzy inference rules were used to determine the final values of the edge pixels and illustrate in the output. The results of the comparison of multiple images using fuzzy algorithms indicate that the approach gives better results than the above methods in dealing with the irrelevant edges and noise. So that the noise in the image is highly deleted and the accuracy of locating the edge positions is also greatly enhanced.

Keywords: Edge Detection, Fuzzy Logic Membership Functions, Filter Disc, Irrelevant Edges, Noise

I. Introduction

Edge detection is a term used in image processing and refers to the algorithms that aim to detect edges in the image. We face computer vision at the field of feature selection and feature extraction. Edge detector accepts a digital image as an input and produces the edge map as the output. By this edge map, the boundary between objects in the image can be specified and this operation is useful in segmentation, object detection and pattern recognition on the edges. The importance of edges is to the extent that the human visual system uses a preprocessing step for edge detection. Thus, if we can detect the edges correctly, we will be more successful in later stages of image processing.

(2)

Internat ional journal of Computer Science & Net work Solut ions Nov.2014 -Volume 2.No.11

http:/ / www.ijcsns.com ISSN 2 345-3397

16

inference system used fuzzy rules to detect edges. The algorithm had 4 Inputs related to 4 pixels of instantaneous scan matrix (mask) and had also the pixel identification output that considered the edge pixel. The fuzzy rule base included only 10 fuzzy rules for the classification of pixels. According to (Suryakant,2012), the authors proposed an algorithm basedon very simple but efficient fuzzylogic to detect edges in an image without specifying a threshold value. The Proposed approach begins from pixels by scanning images using floating window 3 × 3. Fuzzy Inference System has eight inputs that are related to the eight pixels of the instantaneous scan matrix and has an output which specifies the pixel under consideration is "black", "white" or "edge”. In (Alshennawy et al., 2009) the authors proposed that the image should be survey using

a 3 × 3 mask and at each stage of the survey, eight pixels are entered to the Fuzzy Inference

System as inputs. This system has an output that specifies the black, white and edges value for each pixel similar to the method used in (Suryakant,2012). It also uses 8 fuzzy rules for the classification of pixels and then the fuzzy algorithm displays the final results in the output membership function based on the specified values. Zhao and colleagues raised a new technique for three-level image segmentation. They used the two methods of communication between probability andfuzzy areas and the minimum entropy ruleto provide a technique to select the best parameters of the fuzzy area. Necessary condition for the entropy function is to reach to its maximum. Under this condition, an efficient algorithm for three-level threshold is obtained. The parameter on which base the gradient threshold level will be selected is the minimum entropy ratio of maximum entropy (Zhao et al., 2001). Method (khamy et al., 2002) is the development of the method (Zhao et al., 2001). First derivative of the image area in the interval [0100]

isnormalized according to which the image pixels are divided into two

areas.Membershipfunctions of these areas are µsm ooth and µedgethat is Trapezoidal and is

characterized by two parameters t1 and t2. Finally the output of the fuzzy system is applied as a threshold on the first derivative. A significant point of this method is the variable parameter so thatthese two parameters must be obtained by trial and error for different images. In this paper, we use fuzzy logic and filter disk to accurately detect the edges in comparison with fuzzy, Sobel and Cannymethods and prevent the noise and the irrelevant edges of the image. The output of the algorithm is a binary image that includes only the identified pixels as an edge.

II. proposed method

Fuzzy image processing can be divided into three phases: fuzzification of the image, modifying the e fuzzy membership values and defuzzification. In the proposed fuzzy system, at first we apply the filter disk into an input 8-bit image. When the disc filter is applied to an image, it causes the image to be blurred. By applying this filter, the problem of sharp edges is solved and the background noises in the picture disappear. After applying the filter disk to an image, a 3 × 3 mask is placed on the image horizontally and pixel by pixel ,So thatthe intensity values of 8 neighboring pixels are p1, p2, p3, p4, p6, p7, p8 that are transferred to the trapezoidal fuzzy membership functions by a nested loop.

The range considered for the intensity values of black and white pixels in this trapezoidal membership function are as follows (Figure 1):

(3)

17

Figure. 1.Membership Function Input ofthe Proposed Method

In this section, the image pixels that have a value between 0 and 255 are mapped in two groups of "black", "white" in the range 0 to 1 and this process is usually called “fuzzification”. After the fuzzification, an adjustment is performed on the fuzzy value thatstrengthens the weak edges, removes the extra points and finding the edges. In this study, this adjustment is done using 12 rules of inference (if - then) according to table (1). These 12 rules are defined based on the neighboring pixels and the operator "and" is used among them. When the adjustment was done by these rules, all rules are combined in a fuzzy set by operator "or" (maximum). In order to display the results in the hardware, the image must be converted from the fuzzy mode to the 8-bit mode. In the proposed method, the pixels are defuzzificated through Mamdani and Centroid methods. The purpose of this procedure is to obtain a single value compiled by the fuzzy that calculates the center under the curve. At the final phase of our proposed system, there is an output that specifiesthe final value of edge pixels in an image by a triangular membership function. (Figure 5)

Edge = [0 4 8]

Figure. 2. Membership Function Output of the Proposed Method

P3 P2 P1

P6 edge P4

P9 P8 P7

M

as

k

3

×

(4)

Internat ional journal of Computer Science & Net work Solut ions Nov.2014 -Volume 2.No.11

http:/ / www.ijcsns.com ISSN 2 345-3397

18 TABLE 1

INFERENCE RULES DEFINED FOR EDGE DETECTION AND ITS DIRECTION

(W= White, B=Black, E=Edge)

The Output Of The Fuzzy System

The Inputs Of The Fuzzy System

P5 P9 P8 P7 P6 P4 P3 P2 P1 E B B B W W W W W E W W W W W B B B E W W B W B W W B E B W W B W B W W E W W B W B W B B E B B W B W B W W E W B B W B W W B E B W W B W B B W E W W W W B B B B E B B B W B W W W E W W W B W B B B E B B B B W W W W

III. Simulation results

(5)

19

In the comparison between the proposed method with fuzzy algorithm (paika et al., 2013)thatis shown in Figure 3, it can also be said that at the outputs generated by both the phase and the proposed methods, the pixels have been detected in the transition from high intensity to low intensity level (Bottom of the car image and the bottom left corner of airplane image). The problem of the fuzzy approach output, particularly in these two images,is that the fuzzy approach (paika et al., 2013)failed to define the edges so that in the car image the edges are poor with no quality. In the airplane and human face images, a level of the pixel is marked as an edge instead of image edge detectionbut in the proposed method, the edges are largely segregated and the algorithm was able to detect the edge in areas where the pixels have a low pixel intensity difference.

In comparing the proposed method with the cannyalgorithm thatis shown in Figure 6.4, it can be said thatin these two images, the cannyalgorithm has been successful in the main edges detection, but this method has considered many pixels on the ground (Figure 4), which are not essentially the edge. In Figure 6, the extra edges are visible in the middle of the image. In the output of the proposed method, as can be seen in Figure 6.4, the extra and subsidiary edges have not been identified while preserving the edges in the image.

As you can see in Figure 8, the Sobel edge detection results of an operator with the automatic estimation of a threshold on the image with Gaussian noise of 15% of indicate that the operator does not allow the edges to be visible in areas with low contrast leading to the double edges in the image. The operator has been unsuccessful in the control of noise on the edges and the weakness caused discrete and excessive edges, because it had is detected the noise on the edges as the pixel edge. This algorithm has also been unsuccessful in inhibiting the noise points in the middle of the image with the uniform intensity values and has made the noise points wrongly. In this comparison, the proposed method shows the edge detection in low-contrast areas and this advantage is due to the different behavior of the fuzzy rules in areas with different contrast levels. Also given the output of this method, it can be found that the presence of noise on the edges and other parts of the image is controlled as much as possible and the algorithm has been able to retain edge quality in the presence of noise.

IV. Conclusion

In this paper, a new edge detection method was introduced using fuzzy logic and filter disc. The results show that the proposed algorithm is the main core of the research and is less sensitive to noise compared with other algorithms. It has worked better than the Sobel and Canny algorithm s in binary edge detection and side edges and provides more consistent and stronger margins. In general, according to the results expressed in the previous section, we can conclude that:

• Expressed fuzzy reference system provides more reliability for brightness and contrast

changes and prevents avoiding the double edge of the image.

• The proposed algorithm has a lasting impact on Flat and straight lines and also the

circular form provide a good shape for the curve lines.

• It is less sensitive to noise and does not detect the non-edges as the edge.

(6)

Internat ional journal of Computer Science & Network Solutions Nov.2014-Volume 2.No.11

ht tp:/ / www .ijcsns.com ISSN 2345-3397

20

• This method significantly illustrates the robust edges in an image and this feature

provides an important capability for better analysis of the image.

The Output Of The Proposed Method

The Output Of The Fuzzy

Method

The Input Image

(7)

21

Figure. 3. The Results of Comparing the Proposed Method withthe Fuzzy Method (paika et al.,

2013)

he Output Of The Proposed Method he Output Of The Canny Method

The Input Image

Figure.4. The Results of Comparing the Proposed Method with the Canny Edge Detection

(8)

Internat ional journal of Computer Science & Network Solutions Nov.2014-Volume 2.No.11

ht tp:/ / www .ijcsns.com ISSN 2345-3397

22

The Output Of The Proposed Method

The Output Of The Canny Method

Figure. 6. The Results of Comparing the Proposed Method with the Canny Edge Detection

Figure. 7.Input Image With 15% Gaussian Noise

The Output Of The Proposed Method

(9)

23

Figure. 8. The Results of Comparing the Proposed Method with the SobelEdge Detection on an

Image With 15% Gaussian Noise

REFERENCES

i. A. Alshennawy and A. A. Aly (2009). "Edge detection in digital images using fuzzy logic

technique," World Academy of science, engineering and technology, vol. 51, pp. 178-186.

ii. D. Bhagabati (2012). "Edge Detection of Digital Images Using Fuzzy Rule Based

Technique," International Journal of Advanced Research in Computer Engineering& Technology (IJARCET), vol. 2.

iii. E. V. Paika and E. P. Bhambri(2013). "Edge Detection Technique Based on Fuzzy

Logic," International Journal Of Mathematics, vol. 1.

iv. M. Zhao, A. M. Fu, and H. Yan (2001). "A technique of three-level thresholding based

on probability partition and fuzzy 3-partition," Fuzzy Systems, IEEE Transactions on, vol. 9, pp. 469-479.

v. N. K. Suryakant (2012). "Edge Detection using Fuzzy Logic in Matlab," International

Journal of Advanced Research in Computer Engineering& Technology (IJARCET), vol. 2.

vi. S. E. El-Khamy, I. Ghaleb, and N. A. El-Yamany (2002). "Minimum Entropy-Based

Fuzzy Edge Detection," XXVllth General Assembly URSl GA.

vii. S. Wang, F. Ge, and T. Liu (2006). "Evaluating edge detection through boundary

Referências

Documentos relacionados

The main goal of this doctoral research work is to evaluate fuzzy logic as a tool for uncertainty, robustness and reliability analyses of mechanical systems. In this sense, fuzzy

characteristics, and, for this, based on fuzzy logic, the present study uses the fuzzy c-means method to cluster Iguaçu river floods, observed in União da Vitória, using a set of

Neste texto utilizaremos o termo EAD (Educação à dis- tância) para nos referirmos a um sistema de formação misto e flexível com uma forte componente de aprendizagem à

Three categories were established: fuzzy logic as theory (theoretical and/or philosophical research concerning fuzzy logic and its relation to nursing); fuzzy logic as

To perceive the effectiveness of the control scheme proposed in this paper, we have simulated both the fuzzy logic controller and its optimization with the

The structure of the remelting zone of the steel C90 steel be- fore conventional tempering consitute cells, dendritic cells, sur- rounded with the cementite, inside of

By introducing the trust scheme into the fuzzy logic scheme to represent the reliability of the nodes, a cooperative spectrum sensing scheme based on trust and fuzzy logic for

T-norms are used to represent logical conjunction in fuzzy logic and interseption in fuzzy set the- ory, whereas t-conorms are used to represent logical disjunction in fuzzy logic