¨ 58 (2004): 72–75 Int. J. Electron. Commun. (AEU) http://www.elsevier-deutschland.de/aeue
Letter A Simple Neuro-Fuzzy Edge Detector for Digital Images Corrupted by Impulse Noise M. Emin Yüksel and M. Tülin Yıldırım Abstract: A new neuro-fuzzy edge detector for digital images corrupted by impulse noise is presented. The structure of the detector is very simple and comprises four identical neuro-fuzzy subdetectors and a postprocessor. The internal parameters of the detector are determined by training. The detector efficiently extracts edges in digital images corrupted by impulse noise without requiring the filtering of the noise. Keywords: Neuro-fuzzy systems, Image processing, Edge detection
1. Introduction Edges are defined to be sudden changes in the local color intensity of an image and provide important information about the objects contained within the image. Edge detection is usually the first operation that is performed before other image processing tasks such as boundary detection, object recognition, image registration and classification. Therefore the success of these subsequent image processing tasks are strictly dependent on the performance of edge detection. The most important factor decreasing the performance of edge detection is the noise. During image acquisition, digital images are usually corrupted by noise due to a number of imperfections in the imaging process. Most edge detection methods require the removal of noise by using an appropriate noise filter prior to edge detection. In this case, however, the complexity of the system and the processing time are considerably increased. Furthermore, the edge detection performance strictly depends on the performance of the noise filter. Different methods implementing different approaches to edge detection are available in the literature. The classical methods [1, 2] such as the Sobel, Prewitt and Kirsch detectors use the first directional derivative to determine edges. These detectors are simple to implement but they are usually inaccurate and highly sensitive to noise. The zero-crossing edge detectors [1, 2] use the second derivative along with the Laplacian operator. They have fixed detection characteristics in all directions but they are
also very sensitive to noise. The Gaussian edge detectors [2], such as the Canny detector, reduce the influence of noise by smoothing the image before detecting edges. The Canny detector, which is one of the most popular edge detectors in the literature, has been widely used in many applications [3]–[5] because of its superior performance especially in noisy conditions. Although the Gaussian detectors exhibit relatively better performance, they are computationally much more complex. Therefore, a simple edge detector that is capable of extracting edges from digital images corrupted by noise is highly desirable. In the last few years, neuro-fuzzy (NF) systems have been shown to be very suitable tools to cope with the uncertainty which is usually encountered in the process of extracting useful information from noisy images [6]–[9]. Indeed, NF systems jointly exhibit the ability of neural networks to learn from examples and the capability of fuzzy systems to model the uncertainty and imprecision. Hence they may potentially be employed as powerful tools for edge detection provided that appropriate network topologies and training strategies are used. In this work, a simple method for efficient extraction of edges in digital images corrupted by impulse noise is presented. In the proposed method, the edges in the noisy image are directly determined by a NF network without needing the removal of the noise from the image. The proposed NF edge detector is tested on popular images having different image properties and also compared with popular edge detectors from the literature.
2. The proposed edge detector Figure 1 shows the structure of the proposed edge detector. The detector comprises four identical NF networks functioning as subdetectors in horizontal, vertical, left diagonal and right diagonal directions, respectively. Each
Received April 7, 2003. Revised May 12, 2003. M. Emin Yüksel and M. Tülin Yıldırım Dept. of Electronics Eng./Civil Aviation School, Erciyes University, Kayseri, 38039, Turkey. E-mail:
[email protected] Correspondence to: M. E. Yüksel.
Fig. 1. The proposed neuro-fuzzy edge detector. 1434-8411/04/58/01-072 $ 30.00/0
M. E. Yüksel, M. T. Yıldırım: A Simple Neuro-Fuzzy Edge Detector for Digital Images Corrupted by Impulse Noise 73
NF network is a first order Sugeno type fuzzy system with 3-inputs and 1-output. Each input has 3 generalized bell type membership functions and the output has a linear membership function. Readers interested in the details of fuzzy systems may refer to an excellent book on this subject [10]. The input data to the proposed detector are the pixel luminance values of the noisy input image, which are applied to the inputs of the detector as shown in Figure 1. The noisy input image is processed by moving a 3-by-3 analysis window on the image sideways and progressively downwards in a raster scanning fashion, and feeding the appropriate pixels contained within the analysis window to corresponding NF subdetectors, each of which generates a subimage. The outputs of the subdetectors are fed to a postprocessor which generates the final edge image. The postprocessor decides whether the center pixel of a given 3-by-3 analysis window is an edge pixel or not. The postprocessor actually calculates the average value of the four subdetector outputs and compares this value with a threshold. The threshold value is the half of the available dynamic range for the pixel luminance values. For 8-bit images, where the pixel values range between 0 and 255, the threshold value is 128. The edges obtained at the detector output may further be thinned by applying erosion, if necessary. The internal parameters of the proposed edge detector are adjusted by training. Figure 2 shows the setup used for training. Here, the parameters of the proposed edge detector are iteratively adjusted so that its output converges to the output of the ideal edge detector which generates the true edge image for the input training image. The ideal edge detector is conceptual only and does not necessarily exist in reality. It is only the output of the ideal edge detec-
Fig. 2. Training of the proposed detector.
Fig. 3. Training images: (a) Base training image, (b) Input training image, (c) Target training image.
tor that is necessary for training and this can be obtained if the input training image is appropriately chosen. Figure 3 shows the images used for training. The images are 128-by-128 pixel artificial images that can easily be generated by computer. The image shown in Figure 3a is the base training image. Each square box in this image has a size of 4-by-4 pixels and the 16 pixels contained within each box have the same luminance value. The image in Figure 3b is the input training image and obtained by corrupting the base training image by impulse noise. The image in Figure 3c is the target training image. It is a black and white image and its black pixels indicate the true edges of the input training image. Hence it represents the output of the ideal edge detector for the input training image. The images in Figure 3b and 3c are employed as the input and the target (desired) images during training, respectively. The parameters of the four subdetectors are then tuned so as to minimize the learning error by using the Levenberg-Marquardt optimization algorithm [10].
3. Results and discussion The proposed NF edge detector is implemented in computer and applied to a number of popular test images from the literature including the Boats, Lena, Rice and Cameraman images. All test images are 8-bit grey level images having the same size of 256-by-256 pixels. In all experiments, the four original images are corrupted by impulse noise with 20% noise density before processing them with the proposed NF edge detector. In order to make comparisons, the same images are also processed by using the Sobel and the Canny edge detectors. Figure 4 shows the output images of all detectors for the test images. It is observed from this figure that the performance of the Sobel detector is very poor. For all test images, its output images are severely degraded by noise. Most noise pulses are incorrectly detected as edges. Furthermore, only the edges with sharp intensity variation, as in the Cameraman image, are partially reflected to the output image while the edges with less intensity variation are completely lost in the noise. The Canny detector has a considerably better performance than the Sobel detector. It correctly detects most of the noise pulses and these are not reflected to the output image as edges, especially for the Blood and the Cameraman images. However, the effect of noise is still clearly visible as real edges are significantly distorted by the noise. Due to the Gaussian smoothing of the detector, the edges in the more detailed regions of the input image are not properly detected, as for the Boats image. In addition, the edges where the luminance variation is not very sharp are almost lost in the noise. This is especially observed for the Pentagon image. On the other hand, the proposed NF edge detector exhibits very good detection performance and successfully detects most of the edges in all images. The effect of noise on the performance of the detector is much less compared
74 M. E. Yüksel, M. T. Yıldırım: A Simple Neuro-Fuzzy Edge Detector for Digital Images Corrupted by Impulse Noise
Fig. 4. Comparison of the proposed edge detector with the Sobel and the Canny edge detectors. From left to right: Original, Noisy, Sobel, Canny, Proposed.
to the Sobel and the Canny detectors. Object boundaries and other details in the images are reflected to the output image of the proposed detector much better than the other detectors. The edges in the more detailed regions of the input images are successfully extracted, as observed in the Boats image. In addition, the proposed detector shows a significantly better performance at detecting the edges where the luminance variation is not very sharp. The performance difference is very clear especially for the Pentagon image. It is clearly observed that the proposed detector offers superior performance over the Sobel and the Canny edge detectors for all images.
4. Conclusion A novel NF edge detector for digital images corrupted by impulse noise is presented. The fundamental advantage of the proposed detector is that it does not require the pre-
filtering of the image with a noise filter. Furthermore, the training of the detector is accomplished by utilizing simple artificial images that can easily be generated by using a computer. It is concluded that the proposed edge detector can be used for efficient extraction of edges in digital images corrupted by impulse noise. Acknowledgement. This work is supported by Erciyes University Scientific and Technological Research Center. (Project Code: 02-012-4). The authors also wish to thank Dr. ˙Ibrahim Develi for his helpful suggestions.
References [1] Umbaugh, S. E.: Computer vision and image processing. Prentice-Hall International Inc., 1998. [2] Albovik, R.: Handbook of image and video processing. Academic Press, 2000. [3] Linares, I.; Maersereau, R. M.; Smith, M. J. T.: JPEG estimated spectrum adaptive post filter using image-adaptive
M. E. Yüksel, M. T. Yıldırım: A Simple Neuro-Fuzzy Edge Detector for Digital Images Corrupted by Impulse Noise 75 Q-tables and Canny edge detectors. ISCAS-96, IEEE International Symposium on Circuits and Systems, Atlanta, Georgia, USA, 1996. 722–725. [4] Ali, M.; Clausi, D.: Using the Canny edge detector for feature extraction and enhancement of remote sensing images. IGARSS-01, IEEE International Symposium on Geoscience and Remote Sensing, Sydney, Australia, 2001. 2298–2300. [5] Hongjian, S.; Ward, R.: Canny edge based image expansion. ISCAS-2002, IEEE International Symposium on Circuits and Systems, Scottsdale, Arizona, USA, 2002. 785–788. [6] Choi, Y. S.; Krishnapuram, R.: A robust approach to image enhancement based on fuzzy logic. IEEE Trans. on Image Processing 6(6) (1997), 808–825.
[7] Russo, F.: Noise removal from image data using recursive neurofuzzy filters. IEEE Trans. on Instrumentation Measurement 49(2) (2000), 307–314. [8] Carotenuto, R.; Sabbi, G.; Pappalardo, M.: Spatial resolution enhancement of ultrasound images using neural networks. IEEE Trans. on Ultrasonics, Ferroelectrics and Frequency Control 49(8) (2002), 1039–1049. [9] Yüksel, M. E.; Ba¸stürk, A.: Efficient removal of impulse noise from highly corrupted digital images by a simple neurofuzzy operator. Int. J. Electron. Commun. (AEÜ) 57(3), (2003), 214–219. [10] Jang, J. S. R.; Sun, C. T.; Mizutani, E.: Neuro-fuzzy and soft computing. Prentice-Hall International Inc., 1997.