• No results found

An Efficient Fuzzy Logic Based Edge Detection Algorithm for Gray Scale Image

N/A
N/A
Protected

Academic year: 2020

Share "An Efficient Fuzzy Logic Based Edge Detection Algorithm for Gray Scale Image"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)

245

An Efficient Fuzzy Logic Based Edge Detection Algorithm for

Gray Scale Image

Aijaz Ur Rahman khan 1, Dr. Kavita Thakur 2 1

Research Scholar, 2Reader, (S.O.S. Electronics),Pt. R. S. U. Raipur(Chhattisgarh), INDIA

Abstract— Various Edge detection algorithm has been proposed in the literature for extracting the edges from the image. After emerging the fuzzy logic concept, a lot of Researcher of image processing shifted their attention towards the fuzzy logic concept and its applicability in the field of image processing. This paper presents a fuzzy rule base algorithm which is capable of detecting edges efficiently from the gray scale images. The performance of the proposed method is demonstrated through computer simulation in comparison with the existing sobel and prewitt edge detector.

Keywords — fuzzy logic, Edgedetection, fuzzy sets, Threshold, Membership function

I. INTRODUCTION

Edge Detection has been very useful low-level image processing tool for image analysis in computer vision and pattern recognition field. In image, edges carries essential information of an object of interest in image as they separate dissimilar regions in an image. Specific linear time-invariant (LTI) filters is the most common procedure applied to the edge detection problem, and the one which results in the least computational effort. In the case of first-order filters, an edge is interpreted as an abrupt variation in gray level between two neighbor pixels. the goal in this case is to determine in which points in the image the first derivative of the gray level as a function of position is of high magnitude. By applying the threshold to the new output image, edges in arbitrary directions are detected. Early edge detection methods, such as the Sobel and Prewitt detectors [1], [2] were based on the concept of spatial derivative filtering, where local gradient operators are used to detect edges of certain orientations only. Derivative filters suffer when the edges are blurred and noisy and are not flexible. Marr and Hildreth [3] proposed an algorithm that finds edges at the zero-crossings of the Laplacian of an image. Canny [4] proposed a method to counter noise problems from gradient operators, where the image is convolved with the first-order derivatives of Gaussian filter for smoothing in the local gradient direction followed by edge detection by thresholding.

Most edge detector detect edges by applying local first order and second order derivative operator followed by some noise removal algorithm to reduce the noise.SUSAN edge detector [5] is a non-linear techniques to find the edges. Such technique have also gained popularity. Hou and Kuo [6] have used simple arithmetic and logical operation to find the edges in an image. Jiang and Bunke[7] have presented a novel scan line approximation method of edge detection. Their algorithm showed superior segmentation quality and computational cost to many region based algorithms . Caragea [8] computes the difference between central pixel and surrounding pixel and uses the highest value among these for detecting the edges. Genming [9] applied a 5x 5 window to reduce the noise efficiently while does not increasing the width of the edges which always happen in case of taking 5×5 window.Since this detector uses a self-adjusting threshold, therefore it is capable of detecting the edges in the area of variable grayscale background.

(2)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)

246

Mansoori [21], grouped all the adjacent pixel around a considered pixel in 6 different set.then he determined the membership value for each group by applying some bell shape function.then by using these membership value and fuzzy rule, existence of the edge pixel is determined.

In the proposed work an algorithm based on fuzzy logic rules are developed for detecting edges from an image. In order to avoid the complexity, scanning mask of 2×2 pixels window is used. A fuzzy inference based system has been designed under MATLAB platform to detect the edge. A rule-base consisting of 16 rules has been developed to detect the pixel under consideration in a 2×2 window as White, Edge or Black.

II. DESIGN OF FUZZYINFERENCE SYSTEM

In order to detect the edge in the image, a fuzzy inference system has been designed which take different pixel value as inputs, fuzzified these input i.e. convert it into fuzzy plane and then using some predefined rule mark the considered pixel as edge ,Black, White.Mandani method is chosen as the defuzzification method and the output of the system is calculated as the centroid of the resulting membership functions.Block diagram of proposed method is shown in fig.1.

A. Window mask

Fuzzy inference system for this algorithm has four inputs and one output. Since in this algorithm 2×2 window mask is used for scanning purpose, therefore four- pixel values obtained by this mask is used as four inputs .

[image:2.612.348.548.144.523.2]

(3)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)

247

A 2×2 mask used in this algorithm is shown in Fig. 2,here since P1 is black and P2,P3,P4 are white therefore as per the rule shown in Table 2 the output pixel P4out is

marked as white.

[image:3.612.337.541.143.409.2]

Figure. 2 Window Mask

B. Membership Function

The choice of membership function is problem dependent. In this algorithm Triangular Membership functions is used for input as well as for output.

The standard Triangular membership function is defined as

[image:3.612.136.197.198.269.2]

And its shape is shown in figure3

Figure. 3 Shape of Triangular function

The parameter of this function is denoted as a,b,c where b is a peak point, left width is (b-a) and right width is (c-b).

C. Fuzzy sets

The input pixels are divided in to two fuzzy sets i.e. Black & White while the output pixel is divided into three fuzzy sets i.e. Black ,Edge and White. Membership function associated with in put fuzzy sets and output fuzzy set is shown in figure 4 and figure 5.

Figure. 4 Input Pixels Fuzzy Set

Figure. 5 Output Pixels Fuzzy Set

[image:3.612.59.253.367.587.2]

All the parameters for input and output fuzzy set is summarized in a Table I

TABLE I Fuzzy set parameter

Fuzzy Input

Linguistic variable for

pixel

Range

Parameter MF

P1 White [0 255] [0 255 255] Triangular

Black [0 0 255] Triangular

P2 White [0 255] [0 255 255] Triangular

Black [0 0 255] Triangular

P3 White [0 255] [0 255 255] Triangular

Black [0 0 255] Triangular

P4 White [0 255] [0 255 255] Triangular

Black [0 0 255] Triangular

Fuzzy Output

Pixel

Name Range MF

P4out

Black

[0 255]

[0 4 8] Triangular

Edge [130 133

136] Triangular

White [247 251

[image:3.612.323.563.465.698.2]
(4)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)

248

III. PROPOSED ALGORITHM

[image:4.612.68.273.215.321.2]

The algorithm begin with by sliding 2×2 window on whole image pixel by pixel row wise from left to right and top to bottom.after this these 4-pixel undergoes different fuzzy condition as shown in Fig. 6 and change the value of p4.

Figure. 6 Fuzzy Conditions

Fuzzy inference system test the condition of each pixel using Rule-base given in Table II and mark the pixel as edge, white or Black pixel.

TABLE II Fuzzy Rule

Fuzzy Input Fuzzy

Output P1 P2 P3 P4 P4out

B B B B B

B B B W E

B B W B E

B B W W E

B W B B E

B W B W E

B W W B E

B W W W W

W B B B E

W B B W E

W B W B E

W B W W E

W W W B E

W W B W E

W W W B E

W W W W W

Following are the steps of algorithm-

1.Input theP1, P2,P3,P4 pixel from the scanned window to FIS system and fuzzified it into different degree of Black and White.

2.Then apply Fuzzy t-norms operator (MIN) for calculating firing strength.

3.Fire the fuzzy rules for each crisp input.

4.Apply the MAX operator(s-norm) to get the aggregate resultant output.

5.Apply the Defuzzification step using centroid method.

6.Get the crisp P4out pixel which may come under

White, Black or Edge category.

7.Compute the first derivative and threshold it to get the edge of the image.

IV. RESULT AND DISCUSSION

The proposed fuzzy edge detection algorithm was simulated using MATLAB Ver.6.5 on a system having dual core processor and 2GB of RAM. The performance of proposed method is compared with the sobel and prewitt operator.Two set of test images and are shown in figure.9. and figure. 10. One set comprises of standard grayscale images and the result of sobel operator(b),prewitt operator(c) and proposed edge detector(d) while the second set comprises of grayscale images taken by author himself and the respective results.

[image:4.612.344.544.563.662.2]
(5)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)

249

[image:5.612.60.271.129.650.2]

ab cd

(6)

International Journal of Emerging Technology and Advanced Engineering

Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)

250 ab

[image:6.612.61.274.131.268.2]

cd

Figure 10. Original image(a), Sobel (b), Prewit(c) Proposed Fuzzy Method (d).

V. CONCLUSION

This paper presents an efficient fuzzy inference system for edge detection.Comparison of sobel, prewitt and proposed algorithm concludes that the more efficient edge detection is possible with the proposed algorithm. The computational complexity is also reduced. The same method can be applied using 3 x 3 window or the higher dimension window.

REFERENCES

[1 ] Pratt, W.K., Digital Image Processing, New York: Wiley-Interscience, 1978.

[2 ] Gonzalez, R.C., and Woods, R.E., Digital Image Processing, Addison- Wesley, Reading, M.A., 1992.

[3 ] Marr, D., and Hildreth, E.C., “Theory of edge detection”, Proc. of the Royal Society of London, b207, 1980, 187- 217. [4 ] Canny, J.F., “A computational approach to edge detection”, IEEE

Trans. on Pattern Analysis and Machine Intelligence, 8(6), 1986, 679-698.

[5 ] Smith, S.M., and Brady, J.M., “SUSAN – A new approach to low level image processing”, International Journal of Computer Vision, 23(1), 1997.

[6 ] Hou, T. H. and Kuo, W.L., 1997. “A New Edge Detection method for Automatic Visual Inspection”, International Journal of Advanced Manufacturing Technology, (1997) 13:407412 © 1997 Springer-Verlag London Limited.

[7 ] Jiang, X. and Bunke, H. 1998. “Edge Detection in Range Images based on Scan Line Approximation”, Computer Vision and Image Understanding ,Vol. 73, No. 2, February, pp. 183– 199,1999 Article ID cviu.1998.0715, available online at http://www.idealibrary.com.

[8 ] Caragea S. 2008. Fondater, Administrator and Chief Editor, IntelliProject, “Difference Edge Detection“, Licensed

under IntelliProject open License, Romania,

http://www.intelliproject.net.

[9 ] Genming, C. and Bouzong, Y., 1989. “A New Edge Detector with Thinning and Noise resisting Abilities” , Journal of Electronics, China, Volume 6, No. 4, 314-319, DOI: 10.10071BF02778914. [10 ] L. A. Zadeh, “Fuzzy sets,” Information and Control, 8: 1965, pp.

338-353.

[11 ] A. Kaufmann, “Introduction to the Theory of Fuzzy Subsets Fundamentals Theoretical Elements, Vol. 1. Academic Press, New York, 1975.

[12 ] L.C. Bezdek, “Pattern Recognition with fuzzy Objective Function Algorithm,” Plenum Press, New York, 1981.

[13 ] K. Cheung and W. Chan, "Fuzzy One –Mean Algorithm for Edge Detection," IEEE Inter. Conf. On Fuzzy Systems, 1995, pp. 2039- 2044.

[14 ] Y. Kuo, C. Lee, and C. Liu, "A New Fuzzy Edge Detection Method for image Enhancement," IEEE Inter. Conf. on Fuzzy Systems, 1997, pp. 1069-1074.

[15 ] 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. [16 ] M. Zhao, A. M. N. Fu, and H. Yan, “A Technique of

Three-Level Thresholding Based on Probability Partition a Fuzzy 3-Partition”. IEEE Trans. on Fuzzy Systems, vol.9, no.3, June 2001, pp. 469- 479.

[17 ] Bloch I., “Fuzzy sets in image processing”, ACM Symposium on Allied Computing, 1994.

[18 ] Russo, F., and Ramponi, G., “Edge extraction by FIRE operators”, Proc. of the 3rd IEEE Conference on Fuzzy Systems, 1994, 249-253.

[19 ] 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). [20 ] L. Liang and C. Looney, “Competitive Fuzzy Edge Detection,”

Applied Soft Computing, (3), 2003, pp. 123-137.

Figure

Figure. 1  Block Diagram of proposed method
Figure. 3  Shape of Triangular function
Figure. 6  Fuzzy Conditions
Figure 9.  Original image(a), Sobel(b), Prewit(c) Proposed Fuzzy Method (d).
+2

References

Related documents

This paper considers the observational implications of social influences on adoption decisions for an environment of perfect foresight adopters. We argue that social influences

general education levels, and even high school graduation rates in 1928 (Goldin and Katz, 1998) are highly predictive of these innovations, but reliance upon education alone begs

  Estimating a model similar to Brazel et al. [2007],  who found that water intensive land cover is associated with cooler nighttime summer temperatures; we use actual

Statistics regarding fire-related injuries can be identified using fire incident reports (which often document civilian casualties), ambulance run sheets, emergencey department

Therefore, the optimal location of UPFC based on the line stability index can lead to significant not only the reduction of the transmission losses but also the improvement of

9 Biologische Anstalt Helgoland, Hamburg.. In association with mussels, Fucus vesiculosus L.. Distribution of seagtasses in K6nigshafen. stenophylla are here assumed to

By the end of the 2006 production season, glyphosate- resistant Palmer amaranth was confirmed or being confirmed in North Carolina, South Carolina, Tennessee, and

In the context of this study, Learning objectives 3: Understand the concept of algebraic expression is focused, as it involves higher algebraic skills which has focused