An Innovative Fuzzy Logic Based Approach for Edge Detection

DOI : 10.17577/IJERTCONV2IS03072

Download Full-Text PDF Cite this Publication

Text Only Version

An Innovative Fuzzy Logic Based Approach for Edge Detection

An Innovative Fuzzy Logic Based Approach for Edge Detection

Gaur Sanjay B. C.1

Department of Electronics and Comm. Engineering JIET School of Engineering and Technology for Girls Jodhpur, Rajasthan- 342010

Dr. Jayashri Vajpai2

M. B. M. Engineering College, J. N. V. University, Jodhpur, Rajasthan-342010;

Abstract In many computer vision systems, edge detection is a very important area. Edges define the boundaries between regions in an image, which helps in pattern matching, segmentation, object recognition and image understanding systems. In many applications the overall performance of the system depends of the edges of the objects such as Text Detection, Shape detection, Finger Print Recognition, Pattern Recognition, and Number Plate Recognition etc. In above applications Edge Detection play important role in detection, segmentation and recognition of an object. Hence edge detection is a fundamental aspect of low-level image processing. In this paper, a feature based fuzzy rule guided novel technique has been proposed for edge detection. Experimental results suggest that this approach is an efficient one in comparison to other traditional techniques. In order to justify the supremacy of performance of our proposed technique five test images have been considered. Result shows that the proposed technique is better than the conventional technique.

Keywords-Fuzzy Logic; Fuzzy Rule; Edge; Fuzzy Inference System (FIS); Membership Function.


    Edge detection is one of fundamental tasks in image processing which provide important information of the images. Edges are defined as a group of pixels where the intensity of a pixel changes very abruptly [1]. These edges form the outline of object(s). Edge detection is one of the most commonly used operations in image analysis, and there are probably many algorithms available in the literature for enhancing and detecting edges. Edge detection is one of very useful and challenging task in computer vision to detect, segment and recognize an object in an image. It is also feature detection, compression and image retrieval systems [2-5].

    The basic steps for edge detection are smoothing, enhancement, detection and localization. The quality of edges degrades in the presence of noise and sometimes after suppression of the noise which blurs the significant transitions of an image. However, some form of smoothing is necessary since edge detection depends on differentiating the image function and this amplifies all high frequency components. Low pass filters most widely used for smoothing filters [2].

    Two simple classical approaches Sobel edge detection technique and Prewitt edge detection technique have been implemented but these two techniques suffer from some

    drawbacks like edge displacement, vanishing edges and false edges [3]. To overcome these problems Canny [6] has proposed new concept of edge detection technique by convolving a Gaussian filter with an image. In most of the applications Canny is most commonly used technique due to it is better result compare to other traditional techniques. Canny is gradient based technique which uses Gaussian filter for smoothing an image. By applying no maximum suppression and thresholding edges are detected. It gives unsatisfactory result on low contrast images and noisy images.

    In traditional computing methodology, the prime considerations are precision, certainty, and rigor. Unlike classical logic systems, Fuzzy Logic (FL) aims at modeling the imprecise modes of reasoning, which is the human ability to make a rational decision when information is uncertain and imprecise. FL starts with the concept of a fuzzy set. A fuzzy set is characterized by a membership function, which takes values in the interval [0, 1], such that the nearer the value to unity, the higher is the membership grade. A fuzzy set is a set without a crisp, clearly defined boundary. It can contain elements with partial degree of membership. Membership criteria are not precisely defined for most classes of objects normally encountered in the real world [7].


    In recent years, fuzzy techniques have also been used to introduce new approaches to edge detection for various applications. Although the proposed technique is flexible and robust, it is very expensive in computing. Also the implementation of these techniques requires more time and effort compared with classical methods. Tao et al. [8] have proposed an edge detection technique based on a fuzzy if then approach. This method avoids the difficulties of selecting threshold values needed in most of the edge detection techniques and all these need prior knowledge to decide parameter values. Tao has used human knowledge to construct a set of linguistic if-then rules for edge detection. Then fuzzy set theory was applied to make it useful for wider class of the images, in the absence of prior information about the images. Hamid R. Tizhoosh [9] has proposed edge detectors based on heuristic membership functions, simple fuzzy rules, and fuzzy complements. The algorithm first enhances the image by means of mapping transform, fuzzy enhancement operator, and inverse mapping

    transformation and then extracts the edge information from the enhanced image using min or max operator. The approach is simple in implementation and fast in computation but results are not much better compare to canny edge detection technique. Suliman C. et al. [10] have proposed another fuzzy logic based method for edge detection. To get desired thickness of the edges authors have used morphological approach. Results of this approach are not good for detection of the corner in the images. Hence there is an ample of scope to work in this research area.

    The purpose of this paper is to introduce simple and fast fuzzy edge detectors. This paper has been divided in to five sections. After introduction, section 2 presents the state of art in this field. A description of proposed model for fuzzy logic based edge detection technique is given in section 3. The experimental results are shown in the section 4. The next describes the conclusion drawn from this paper on the basis of results obtained from the experiments.


    An overview of the proposed model for edge detection can be seen in Figure 1. After the image is captured by the camera, it is passed through the preprocessing unit which processes the raw image captured by the camera. The main operation is to suppress the noise and enhance the image features, so that the proper edges can be detected. The major components of the proposed scheme are described in the following sections.

    1. Pre-processing

      Preprocessing is necessary to detect proper edges of an image. Preprocessing includes three basic operations: image resizing, grayscale conversion and removal of noise, so that the system can perform uniformly well for all still images.

      Input image Pre-processing

      Image Fuzzification

      In blurred images, identification of edges is difficult and requires sharpening of the edges. Fuzzy Logic has hence been employed, to deal effectively with all such uncertainties. Fuzzy rule based image processing has three main parts: image fuzzification, modification of the membership value by fuzzy rules and image defuzzification. Fuzzification and defuzzification are coding and decoding of image data, which makes possible to process images with fuzzy techniques. The main unit of this system is Fuzzy Inference System, hich process the image by modification of membership values.

    2. Fuzzy Sets and Fuzzy Membership Function:

    The experiments were carried out for 8-bit quantized image; with gray levels lying between 0 and 255. The fuzzy sets were created to represent each pixels intensity; these sets were associated with three linguistic variables Black, Edge and White. The membership functions for the fuzzy sets associated with the input is trapezoidal whereas it is triangular for output as shown in Fig. 2(a) and Fig. 2(b) respectively.

    Mamdani method was used for inferencing, which means that the fuzzy sets obtained by applying each inference rule to the input data were joined through the add function. The value of the membership function of the output is decided as per the values of Black, Edges and White sets of the images.


    Fuzzy Rule Base

    Fuzzy Inference System

    Image Defuzzification

    Output Binary Image

    Figure 1: Fuzzy Inference System for Edge Detection

    Further, the RGB color input image is converted to a 256 grayscale image using HSI model [1] given in Equation 1.

    Gray = 0.299*Red+0.587*Green+0.114* Blue (1)

    Then a median filter (5×5) is applied to the gray level image to remove the salt and paper noise, while preserving the sharpness of the image.


    Figure 2: Membership functions for the fuzzy sets associated with a). Input b). Output

    The selection of the inference rule depends on the weight of its neighboring pixels. It can be the strong basis for deciding the edges, black and white. 3×3 mask was considered for implementation of fuzzy rules as shown in Fig. 3.










    Figure 3: 3×3 Mask for fuzzy rule.

    The following 8 rules have been used to identify edges:

    Rule 1. If {P1 & P2 & P3 & P4 & P5 & P6 are White, and P7 & P8 & P9 are Black} then Output1 is Edge.

    Rule 2. If {P4 & P5 & P6 & P7 & P8 & P9 are White, and P1& P2 & P3 are Black} then Output1 is Edge.

    Rule 3. If {P1 & P4 & P7 & P2 & P5 & P8 are White, and P3 & P6 & P9 are Black} then Output1 is Edge.

    Rule 4. If {P3 & P6 & P9 & P2 & P5 & P8 are White, and P1 & P4 & P7 are Black} then Output1 is Edge.

    Rule 5. If {P3 & P5 & P7 & P6 & P8 & P9 are White, and P1 & P2 & P4 are Black} then Output1 is Edge.

    Rule 6. If {P1 & P4 & P5 & P7 & P8 & P9 are White, and P2 & P3 & P6 are Black} then Output1 is Edge.

    Rule 7. If {P1 & P2 & P3 & P5 & P6 & P9 are White, and P4 & P7 & P8 are Black} then Output1 is Edge.

    Rule 8. If {P1 & P2 & P3 & P4 & P5 & P7 are White, and P6 & P8 & P9 are Black} then Output1 is Edge.

    The first four rules deal with the vertical and horizontal direction lines around the center pixel under consideration, which in turns detect the vertical and horizontal edges. The last four rules detect corner edges. The resulting image passed through all these rules contains identified edges in all directions. The output binary image then processed using morphological operation for thinning process, which removing interior pixels. This option sets a pixel to 0 if all its 4-connected neighbors are 1, otherwise leaves the value intact. Now final binary image is termed as edge image.


    The proposed approach has been implemented in Matlab- 2010(a) and gives improved results than all classical method. Five different types of images have been used to test and compare the results with other available techniques. Out of these five results only three are shown in the results. Figure 4, to Figure 6 shows the results obtained by different classical and proposed approach on three images. In these figures, (a) is colored input image, (b) gives detected edges by sobel edge detector (c) gives edge by Prewit edge detector (d) gives detected edges by Canny

    edge detector and finally (e) gives detected edges by proposed edge detector.

    From visual perceptions, figure (e) gives an accurate and more improved results than figure (a to d) for all three input images.

    1. Original Car Image

    2. Sobel Edge Detector

    3. Prewit Edge Detector


In this paper, a new Innovative Fuzzy Logic based approach has been introduced for Edge Detection. Through the results (by the comparison), it can be concluded that in Prewit, Sobel, and Canny edge detection technique eliminate the low intensity

edges of an image. While the proposed approach technique takes into consideration the low level intensity edges. Hence the proposed technique is best edge detector for any kind of image among these all classical techniques.

(d). Canny Edge Detector

(e). Proposed Method

Figure 4. Edge Detection for a Car Image

(a). Original Lena Image

  1. Sobel Edge Detector

  2. Prewit Edge Detector

  3. Canny Edge Detector

  4. Proposed Method

Figure 5. Edge Detection for Lena Image

  1. Original Building Image

    1. Sobel Edge Detector

      1. Prewit Edge Detector

      2. Canny Edge Detector

      3. Proposed Method

Figure 6. Edge Detection for a Building Image


[1]. R. C. Gonzalez, and R. E. Woods, Digital Image Processing.3rd ed. Prentice Hall, 2013, pp.692 -794.

[2]. Basu M., Gaussian Based Edge Detection Methods- A Survey, IEEE Transaction on System, Man and Cybernetics, Vol.32 No. 3.Aug. 2002, pp. 252-260.

[3]. Sanjay B. C. Gaur, and Dr. Jayashri Vajpai, Comparison of Edge Detection Techniques for Segmenting Car License Plates, Special Issue of International Journal of Computer Applications (0975

8887) on Electronics, Information and Communication Engineering – ICEICE No.5, Dec 2011, pp. 8-12.

[4]. M.B. Ahmad, and T. S. Choi , Local Threshold and Boolean Function Based Edge Detection, IEEE Transactions on Consumer Electronics, Vol. 45, No

3. August 1999.

[5]. S. Belongie, J. Malik, and J. Puzicha, Shape Matching and Object Recognition using Shape Contexts, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol 24, No 24, 509 – 522,

April 2002.

[6]. J. F. Canny, A computational approach to edge detection, IEEE Trans. on Pattern Analysis and

Machine Intelligence, vol. PAMI-8, no. 6, pp. 679- 697, 1986.

[7]. Koushik Mondal, Paramartha Dutta, and Siddhartha Bhattacharyya, Fuzzy Logic Based Gray Image Extraction and Segmentation, International Journal of Scientific & Engineering Research, Volume 3, Issue 4, April-2012, pp. 1-14.

[8]. Tao C. W., Wiley E. T., and Taur J.S., A Fuzzy If- Then Approach to Edge Detection, Proceedings of second IEEE conference on Fuzzy System, 1993, pp. 1356-1360.

[9]. Tizhoosh H. R. Fast Fuzzy Edge Detection, IEEE annual meeting of North American, Fuzzy Information Processing Society, 2002, pp. 239-242.

[10]. C. Suliman, C. Boldisor, R. Bazavan, and F. Moldoveanu, A Fuzzy Based Method for Edge Detection, Bulletin of the Transilvania University of Brasov, Engineering Sciences, Vol. 4(53) No. 1, 2011, pp. 159 164.

Leave a Reply