Você está na página 1de 4

Proceedings of the International Multiconference on Computer Science and Information Technology, pp.

7 10

ISBN 978-83-60810-22-4 ISSN 1896-7094

Fuzzy Edge Detection Based on Pixel's Gradient and Standard Deviation Values
Wafa barkhoda, Fardin Akhlaqian Tab, Om-Kolsoom Shahryari
Department of Computer, University of Kurdistan, Sanandaj, Iran w.barkhoda@ieee.org, f.akhlaqian@uok.ac.ir , shahryari.kolsoom@ieee.org
Abstract This paper presents a new fuzzy based edge detection algorithm. Each different edge detection method has its own advantages and disadvantages. For example each method detects part of real edges and also some unreal edges. To reduce this effect we have used two different source of information and a fuzzy system to decide about whether each pixel is edge or not. First both gradient and standard deviation values are computed, form two set of edges, utilized as inputs for our fuzzy system. Then fuzzy system decides on each pixel according to fuzzy rules. Finally we have compared results of the proposed algorithm with other algorithms such as Sobel, Robert, and Prewitt. Experimental results show the ability and high performance of proposed algorithm. Keywords Edge Detection; Fuzzy Logic; Fuzzy Decision System; Gradient, and Standard Deviatio n .

I. INTRODUCTION
DGE

detection is one of the most important algorithms in image processing. It plays a fundamental role in higher level processing [1, 2]. Edges potentially have important information about image content. Also in human visual system, in a preprocessing stage, image edges are detected [3]. Regarding to importance of edges in image processing algorithms, such as object detection, capabilities and accuracy of edge detection algorithms are important factors. Edge is defined as object border, and extracted by features such as gray, color or texture discontinuities [4]. Luminance and geometrical features, lightening condition and noise volume has a great impact on shaping the edge [5]. Edge contains important information of image and provides object's location. Many of edge detection algorithms such as Sobel, Prewitt and Robert are based on gradient value [6]. In these algorithms, the estimated gradient pixel value higher than a threshold is counted as an edge pixel. Because threshold value is often empirically determined, it is possible to lose some edges or over estimation occurs. Another important gradient based edge detection method is canny algorithm which solves an optimization problem to detect the edges [7]. The trade off between detection and location of edge pixels make a problematic inaccuracy [4]. By changing threshold values, edge detection rate increases, but the accuracy of edge locating decrease. Because of noise, low contrast, and some other factor edge detection methods that have been mentioned can not give satisfactory results [8]. For example in some cases over or under edge based segmentation estimation occurs, especially in natural complex image is more obvious.

There are some edge detection algorithms in frequency domain [9, 10]. The algorithm presented by Marr-Hildreth [9] detects zero crossing second order of derivative function in Laplas domain as edge pixels. Low sensitivity to noise is achieved regards to using the Gaussian filter [11]. Some other edge detection algorithms process the image in wavelet domain [10, 12]. In the all above mentioned approaches, after applying edge detection algorithm, and then thresholding, the thinning stage is followed till a single edge pixel is achieved [11]. Mentioning more approaches, morphological based algorithms extracts continues and single pixel edge straightly [13]. To improve results, useful tools such as neural networks [14], fuzzy logic [6, 15], and ant colony [4, 16] are applied by some presented algorithms. In this paper we studied edge detection methods based on fuzzy logic in Section 2, and then proposed algorithm is presented in Section 3. The simulation results are presented in Section 4 and finally conclusion and future works are drawn in section 5. II. FUZZY LOGIC APPLICATION IN EDGE DETECTION Considering the capability of neural network and fuzzy logic based processing, in recent years, many researches have been done on their application at image processing and as a result edge detection algorithm [4, 17-19]. Different algorithms for fuzzy based edge detection have been proposed [20-23]. In the work proposed by Zhao, et al [24], image is segmented by a three level threshold. By applying the two different ways between probability region and three fuzzy regions and also minimum entropy rule, a technique to determine the parameters of best three fuzzy regions is proposed. The necessary condition for maximizing entropy function is also expressed. Based on this condition an effective algorithm for three level thresholding is obtained. Fuzzy based rules method in most of fuzzy based edge detection algorithms are used. In most of these methods, adjacent points of pixels are assumed in some classes and then fuzzy system inference are implemented using appropriate membership function, defined for each class [11]. For example in [6], adjacent points are assumed as 33 sets around the concerned point. By predefining membership function to detect edges. In these rules discontinuity in the color of different 33 sets, edges are extracted. It uses 5 fuzzy rules and predefined membership function to detect

PROCEEDINGS OF THE IMCSIT. VOLUME 4, 2009

edges. In these rules discontinuity of adjacent point around the concerned point are investigated. If this difference is similar to one of predefined sets, the pixel is assumed as edge. A similar work is proposed by Mansoori, et al [15]. In this work adjacent points of each pixel, are grouped in six different set. Then by using of appropriate bell shape membership function, the value from zero to one is determined for each group. Based on the membership values, and fuzzy rules, decision about existing/not existing and direction of edge pixels are obtained. III. PROPOSED ALGORITHM A. Primary Edge Detection and Fuzzy Rules In this paper, at first by two different methods, gradient and standard deviation of pixels value, edges are separately extracted and then based on fuzzy logic, final decision about whether each pixel is edge or not is made. Problematic results could be gained if each of the methods be used solely. It may causes on identifying of edge pixels as non edge pixels and vice versa. Although different methods have been used for edge detection, many of them are gradient based. Therefore in the first method, the gradient values are computed by the Sobel operator and then pixels with gradient value bigger than a threshold are edge candidate. The second used method for edge detection is based on gray level standard deviation (SD) [25]. In this method, for each pixel SD is computed by 33 mask, shown in Fig. 1, over adjacent neighborhood pixels. Similarly pixels with SD grater than a threshold value are edge candidate.
Fig. 2. The defined classes and membership functions

The output of fuzzy system explains to how extent a pixel could be edge. By the defined fuzzy rules, the output of this fuzzy system is classified to one of three classes. The first class, E L , correspond to pixels with low probability value to belong to edge pixels set. In the same way, E M corresponds to medium probability and E H corresponds to high probability. Output membership functions are shown in Fig 3.

Fig. 3.Output membership functions

If SD value of a pixel being equal to k 1 , and gradient be equal to k 2 , the fuzzy rules are defined as the following:
Fig. 1. Applied mask to compute standard deviation

1- If k 1 in SD L and k 2 in G L then P Edge classified to E L 2- If k 1 in SD L and k 2 in G M then P Edge classified to E L 3- If k 1 in SD L and k 2 in G H then P Edge classified to E M 4- If k 1 in SD M and k 2 in G L then P Edge classified to E L 5- If k 1 in SD M and k 2 in G M then P Edge classified to E M 6- If k 1 in SD M and k 2 in G H then P Edge classified to E H 7- If k 1 in SD H and k 2 in G L then P Edge classified to E M 8- If k 1 in SD H and k 2 in G M then P Edge classified to E H 9- If k 1 in SD H and k 2 in G H then P Edge classified to E H These rules are summarized in Fig 4.

By considering two mentioned methods and a fuzzy idea, two computed values are used as fuzzy system inputs. The final decision about edge candidate pixels is based on the output of this fuzzy system. Appropriate membership functions are defined for fuzzy system inputs. To apply these functions, first both SD and gradient values are mapped to the range of [0 100]. Then both of the mapped values are classified to one of the low, medium, or high classes. The SD classes are shown by SD L , SD M , and SD H symbols. To separate different SD classes four different thresholds a 1 , c 1 , a 2 , and c 2 are used. So that if SD value is in the range of [0 c 1 ], then, the corresponding pixel is classified to SD L , for the range of [a 1 c 2 ], the pixel is classified to SD M, and finally for the range of [a 2 100], pixel is classified to SD H . The similar function and classes are defined for gradient value. In Fig 2 the defined classes and membership functions are shown.

Fig. 4. Fuzzy system rule s

WAFA BARKHODA ET. AL.: FUZZY EDGE DETECTION BASED ON PIXELS GRADIENT AND STANDARD DEVIATION VALUES

B. Defuzzification Defuzzification is done using the following equation:


PFinal =

( PEdge ( j ) C j )

(1)

Where P Edge (j) is the pixel membership value in j'th class, and C j is the j'th output class center. Corresponding Fig 3, classes center are determined as the following:

C L = 0.25 , CM = 0.5 , C H = 0.75

(2)

And regard to Eq 2 and 3, P

Final

is equal to:

PFinal is the probability used for final pixel classification as edge or non-edge. A pixel with probability grater than a threshold is classified as edge; otherwise it is classified as background. A typical appropriate threshold value is 1/2. To clarify the algorithm an example is explained. Suppose a pixel SD value equal to 75 and its gradient value is equal to 30. Considering these values and the membership functioned explained in the Fig 2:

Finally compared to the threshold equal to 0.5, pixel is classified as edge. IV. IMPLEMENTATION RESULTS The proposed algorithm is simulated in MATLAB and applied on several test images. The results are compared with the other edge detection methods such as Sobel, Robert, and Prewitt. In first example, Baboon image is processed. The main image is shown in Fig 5.a. The extracted edges by the Sobel, Robert and Prewitt methods are shown in Fig 5.b, 5.c, and 5.d. Finally, the edges extracted by the proposed algorithm are shown in Fig 5.e. As the Figure shown, the proposed algorithm detects much more edge pixels, and superiority of the proposed algorithm is clear. The same experiment run over other test images are shown in this Figure. Similarly, extracted edges by different methods clearly show the superiority of the proposed algorithm.

a1 = 12 , c1 = 37 , a 2 = 62 , c 2 = 87 k1 = 75 , k 2 = 30

( SD L ) = 0 , ( SD M ) = 0.5 , ( SD H ) = 0.5 (G L ) = 0.28 , (G M ) = 0.72 , (G H ) = 0


Regard to the computed membership values and defined fuzzy rules, it's clear that except fuzzy rules number 4, 5, 7, and 8, the other P Edge s are equal to zero. The non-zero P Edge s are computed as the following:

(a)

(b)

(c)

(d)

(e)

Fig. 5. a) Main image, b) Sobel results, c) Robert results, d) Prewitt results, and e) Proposed fuzzy algorithm results

10

PROCEEDINGS OF THE IMCSIT. VOLUME 4, 2009

V. SUMMARY AND FUTURE WORKS In this paper, a fuzzy based new edge detection algorithm is proposed. Based on the primary edge detection methods, gradient and standard deviation computed at each pixel, and are used as fuzzy system input. The fuzzy system includes appropriate defined membership function and fuzzy rules, decide about pixel classification as edge or non-edge. Experimental results show the higher quality and superiority of the extracted edges compared to the other methods in the literature such as Sobel, Robert, and Prewitt. In the proposed algorithm, to achieve good result, some parameters and thresholds are experimentally set. Automatically determining these values needs to further researches. Improving fuzzy system performance by the ways such as using different kind of input, different fuzzy membership functions and rules also need to be investigated in future works. REFERENCES
V. Mittal and M. S. Batra, "Edge Detection Technique By Using Nero Fuzzy System," Proceedings of 2nd National Conference on Challenges & Opportunities in Information Technology (COIT-2008), RIMT-IET, Mandi Gobindgarh. March 29, 2008. [2] R. Gonzalez and R. Wood, Digital Image Processing , Addison Wesley, 1992. [3] K. R. Castleman, Fundamentals of Digital Image Processing , Prentice-Hall, Englewood Cliffs, N.J, 1996. [4] R. Wang, L. Gao, S. Yang, and Y. Liu, "An Edge detection method by combining fuzzy logic and neural networks," Machine Learning and Cybernetics, 7(2005) 4539-4543, 1821, Aug 2005. [5] B. McCane, Edge detection, course note , Department of Computer Science, university of Outage, Dunedin, Newzeland, February, 2001. [6] L. Liang and C. Looney, "Competitive Fuzzy Edge Detection," Applied Soft Computing , (3) 123-137, 2003. [7] J. Canny, "A Computational Approach to Edge Detection," IEEE Trans, Pattern Anal . Mach. Intel. 8 (6) 679687, 1986. [8] D. Marr and E. Hildreth, Theory of edge detection , Pross. Royal Soc., London, Vol. 207, pp. 187-217, 1980. [9] J. Siddique and K. Barner, "Wavelet-based multiresolution edge detection utilizing gray level edge maps," IEEE Press, International Conference on Image Processing (ICIP 98), vol 2, pp. 550-554, 1998. A. [10] J. Musevi-Niya and A. Aghagolzadeh, "Adaptive directional wavelet-based edge detection," 2nd International Symposium on Telecommunications (IST2003), Isfahan, Iran, pp.191-195, 16- 18 August 2003. [1]

[11]

M. N. Mahani, M. K. Moqadam, H. N. pour, and A. Bahrololoom, "Dynamic Edge Detector Using Fuzzy Logic," CSISS' 2008, Sharif University of Technology, Kish, 2008, (In Persian). [12] W. Deng and S. Iyengar, "A New Probabilistic Relaxation Scheme and Its Application to Edge Detection," IEEE Trans, Pattern Anal. Mach. Intel. 18 (4) 432-437, 1996. [13] W. Chen and S. Acton, "Morphological pyramids for multiscale edge detection," IEEE Southwest Symposium on Image Analysis and Interpretation, pp. 137-141, 5-7 April 1998. [14] S. Lu, Z. Wang, and J. Shen, "Nero-fuzzy synergism to the intelligent system for edge detection and enhancement," the journal of the Pattern Recognition society , accepted 1 October 2002. [15] G. Mansoori and H. Eghbali, "Heuristic edge detection using fuzzy rule-based classifier," J ournal of Intelligent and Fuzzy Systems, Pages 457 469, Volume 17, Number 5 / 2006. [16] H. Nezamabadi-pour, S. Saryazdi, and E. Rashedi, "Edge detection using ant algorithms," Soft Computing , vol.10, no. 7, pp. 623-628, 2006. [17] H. Wong and L. Guan, "A Neural Learning Approach for Adaptive Image Restoration Using a Fuzzy Model-based Network Architecture," IEEE Trans, Neural Network 12 (3) 516-531, 2001. [18] C. Looney, "Nonlinear Rule-based Convolution for Refocusing," Real Time Imaging , (6) 29-37, 2000. [19] H. M. Lozoya, D. M. Rodriguez, F. J. Romero, and H. Tawfik, "Handoff Algorithms Based on Fuzzy Classifiers," IEEE Trans, Vehicular Technol , 49 (6) 2286-2294, 2000. [20] K. Cheung and W. Chan, "Fuzzy One Mean Algorithm for Edge Detection,"IEEE Inter. Conf. On Fuzzy Systems, pp. 2039- 2044, 1995. [21] Y. Kuo, C. Lee, and C. Liu, "A New Fuzzy Edge Detection Method for Image Enhancement," IEEE Inter. Conf. on Fuzzy Systems , pp. 1069-1074, 1997. [22] S. El-Khamy, N. El-Yamany, and M. Lotfy, "A Modified Fuzzy Sobel Edge Detector," Seventeenth National Radio Science Conference (NRSC'2000), February 22-24, Minufia, Egypt, 2000. [23] F. Russo, "Edge Detection in noisy images using fuzzy Reasoning," IEEE Trans. on Instrumentation and Measurement, vol.47, no.5, 1998. [24] M. Zhao, A. Fu, and H. Yan, "A Technique of ThreeLevel Thresholding Based on Probability Partition a Fuzzy 3-Partition," IEEE Trans. on Fuzzy Systems, vol.9, no.3, pp. 469- 479, June 2001. [25] A. A. Abin and H. Beygi, "An Accordant Edge Detection Algorithm Based on CLA," CSISS' 2008, Sharif University of Technology, Kish, 2008, (In Persian).

Você também pode gostar