# Introduction igital images are nothing but the sampled versions of continuous real world pictures which are usually discrete domain and discrete range signals. Digital images are precious and significant resource of information in several research and application fields that includes remote sensing, astronomy, biology, medicine, remote sensing, materials science, etc.,. The digital images are usually affected by impulse noise [15] because of a number of nonidealities in the imaging method while image acquisition and transmission occurs. The noise is generally involved by means of a faulty medium involving the original scene and the imaging scheme or a nonideal imaging. The noise generally damages the images by modifying several pixels of the source image with new pixel values containing the luminance values close to or identical to the minimum or maximum of the permissible dynamic luminance range. In the majority of applications, it is very essential to suppress the impulse noise [5] from digital image because the performances of subsequent image processing techniques are strictly reliable on the accomplishment of image noise removal process [16]. Conversely, this is a very difficult in any image processing technique since the restoration filter must not alter the useful data in the image and conserve image data and texture during noise removal. The existing noise removal filters generally have the demerits of inducing unwanted distortions and blurring effects into the resulted image during noise removal phase. Application-specific noise removal techniques are required to concurrently reduce the effects of the corruptive process and protect important details of the images. Impulse noise reduction in image processing frequently engages the subtraction of these salt and pepper noise [14] from images that are very essential pre-processing process for the most other succeeding processing steps such as edge detection, segmentation and classification. In this field, early advances were provided by linear filtering. They have had massive impact on the progress of several methods for processing stationary and non-stationary signals. Still, there are a several situations where linear filtering technique works unsuccessfully. The demerit is the failure to concurrently remove noise and protect high frequency data (edges, detail) in the occurrence of broadband noise. When signal and noise are well divided in the frequency domain, linear filters cannot able to eliminate noise without modifying the original value itself. In addition, the Human Visual System (HVS) consist of several nonlinear effects that are required to be taken for consideration for building the efficient image processing techniques, necessitating non-linear techniques; the non-linear activities of optical imaging systems and their associated image creation systems must be considered. At last, images are signals that are usually not satisfying the broadly used premises of Gaussianity and stationary that certifies the linear models and filtering methods. By these, linear filters are not able to suppress an impulse noise overlay on an image without distort its edges. Median filters [6,7] are the well-known nonlinear rank ordered filters that afford outstanding results in the suppressing the salt and pepper noise than other existing filters because of its perfectness, computational efficiency and simplicity. Although it is very valuable in the suppressing the impulse noises [17], median filters [13] leads to alter uncorrupted pixels values directing to the loss of better quality image data leading to edge jitter and streaking. The Weighted Median Filter and the Center Weighted Median filter [8] provide much significance to present pixel, preventing better image data, but provide less noise reduction when the center weighted pixel itself is affected. To overcome these demerits, many variants of the median filter techniques came up with the purpose of modifying only those pixels affected by impulse noise, leaving unaffected nonimpulsive pixels as such. i.e., judgment were to be provided by the filtering techniques as to when modification is to be performed and when not. Moreover the median value that is to modify the affected pixel is to be the most appropriate and perfect. To satisfy these necessities, an Adaptive Fuzzy Switching Filter is proposed in this paper which can overcome the difficulties faced by the existing median filters. # II. Related Works Schulte et al., [1] proposed a fuzzy two-step filter for impulse noise reduction from color images. A novel method for suppressing impulse noise [9] from digital images is provided in this paper, in which a fuzzy detection process is followed by an iterative fuzzy filtering method [12]. The filter proposed by author is called as fuzzy two-step color filter. The fuzzy detection technique in this paper is generally based on the computation of fuzzy gradient values and on fuzzy reasoning. This step found out three different membership functions that are passed to the filtering phase. Those membership functions are used for fuzzy set impulse noise depiction. The proposed novel fuzzy technique is particularly developed for suppressing impulse noise from color images while preventing other image data and texture. Evaluation of the proposed noise filter indicates that it can be useful in removing the impulse noise efficiently from color images without affecting the valuable data in the image. Sun et al., [2] provided an impulse noise image filter using fuzzy sets. The successful use of fuzzy set theory performance on many domains, together with the increasing requirement for processing digital images, have been the main intentions following the efforts concentrated on fuzzy sets [10,11]. Fuzzy set hypothesis, contrasting with some other hypothesis, can offer us with knowledge-based and robust means for image processing. By calculating the fuzziness of the pixels affected degree and taking equivalent filter parameters, a novel image filter for suppressing the impulse noise is proposed in this paper. The proposed filter is more effective when compared to the median filter which is good for suppressing the impulse noise. Finally, the experimental result shows the feasibility of the proposed filtering technique. Awad et al., [3] put forth a high performance detection filter for impulse noise removal in images. In the approach provided by the author, the noisy pixels are found out iteratively through many steps, based on a set of distinctive resemblance criteria. Experimental result shows that the high performance detection filter outperforms other filters at medium to high noise levels and reduces the impulse noise efficiently while protecting image data, even thin lines. Ibrahim et al., [4] given a simple adaptive median filter for the removal of impulse noise from highly corrupted images. This author proposed a simple, yet efficient technique to suppress impulse noise from noise affected images. This new technique composed of two phases. The first phase is to find the impulse noise affected pixels in the image. In this phase, depends on only the intensity values, the pixels are approximately separated into two classes, which are "noise-free pixel" and "noise pixel". Then, the second phase is to remove the impulse noise from the noise affected image. In this phase, only the "noise-pixels" are processed. The "noisefree pixels" are kept as such to the output image. This technique adaptively modifies the size of the median filter depends on the number of the "noise-free pixels" in the neighborhood. For the filtering process, only "noisefree pixels" are taken into account for the detection of the median value. The experiment evaluation for 100 test images indicates that the proposed technique outperforms some of the existing techniques, and can suppress the noise from highly corrupted images, up to noise concentration of 95%. Average evaluation time required to completely process images of 1600times1200 pixels with 95% noise percentage is below 2.7 seconds. Because of its simplicity, this proposed technique is appropriate to be implemented in consumer electronics products such as digital television, or digital camera. # III. Methodology The proposed filter involves three phases: ? The first phase seeks to detect the impulse noise by taking into consideration of grayscale values among neighboring pixels. ? The second phase performs the grayscale value evaluation based on the values of neighboring pixels. ? The final phase is responsible for modifying the pixel value of this correction for more improvement in the preserved details with the help fuzzy switching. Let I defines the grayscale image as a N X N matrix, where I(i, j) indicating the value of pixels at ith row and jth column. # Phase 1: Impulse detection The two assumptions normally used for impulse detection are ? A image with no noise consists of locally smoothly varying areas separated by edges ? A noise pixel will be with the pixel value considerably larger or smaller than those of its neighbors. In the filter window of size 5 × 5 with the center pixel value is I (i, j), the 5 X 5 image is initially convolved with four one-dimension Laplacian operators. Every operators is responsive to edges in a various direction. Then, the least absolute value w(i, j) of these four convolutions is considered for the impulse detection, which can be indicated as: ??(??, ??) = ??????????(??. ??) ? ?? ?? ?: ?? = 1 ???? 4? Where Kp denotes the p th kernel, and ? indicates a convolution process. The value of w(i, j) finds the impulses because of the following reasons: ? w(i, j) is large when the present pixel is an isolated impulse as the four convolutions are large and approximately the same ? w(i, j) is small when the present pixel is a without noise flat-region pixel as the four convolutions are nearer to zero ? w(i, j) is small also when the present pixel is an edge pixel as one of the convolutions is very small (nearer to zero) even though the other three may be large. From the above reasons, w(i, j) is large when the pixel I (i, j) is affected by noise, and w(i, j) is small when the pixel I (i, j) is not affected by noise whether or not it is a flat-region, edge, or thin-line pixel. # Phase 2: The estimation of the current pixel For achieving optimal detail protection, the maximum-minimum exclusive median technique is built to guess the affected pixel. The algorithm is as follows: Define N =1. In the filter window of size (2N+1)×(2N+1) with the center pixel is I(i, j) , seek the maximum and minimum grayscale pixel values defined as g max and g min , correspondingly. The grayscale values of every pixels in the filter window is compared with g max and g min , if I (i + n, j + m) / 4 approximates to gmax / 4 or g min / 4 (here, n, m?[?N,+N]), reject these pixels, compute the number K of the remaining pixels. If K = 0 and N = 1, then describe N = 2 and repeat the above process. If K > 0, then computes the median grayscale value M of the pixels not rejected. If K = 0, then compute the average AVG of the filtered obtained values of the four neighboring pixels surrounding the present pixel I(i, j) . The estimation value E(i, j) can be described as follows: ?? = ????????????{??(. )} ?????? = [??(1 ? 1, ?? ? 1) + ??(1 ? 1, ??) + ??(1 ? 1, ?? + 1) + ??(??, ?? ? 1)]/4 ??(??, ??) = ? ?? ???? ?? > 0 ?????? ???? ?? = 0 Where {r(?)} denotes the pixels not discarded. # Phase 3: The modification of the current pixel based on fuzzy switching If ?[w(i, j)]?[0,1] is the membership function of w(i, j) which represents how much a pixel nearing an impulse noise, the following fuzzy rules can be described: Rule 1: if w(i, j) is large, then ?[w(i, j)] is large. Rule 2 : if w(i, j) is small, then ?[w(i, j)] is small Based on the above rules, S-function can be used to describe the membership function of the impulse noise corruption extent of the current pixel: ??[??(??, ??)] = ? ? ? ? ? ? ? 0 ???? ??(??, ??) ? ?? 2 ? ??(??, ??) ? ?? ?? ? ?? ? 2 ?????? ? ??(??, ??) ? ?? 1 ? 2 ? ??(??, ??) ? ?? ?? ? ?? ? 2 ???? ?? ? ??(??, ??) ? ????[??(??, ??)] = ? ? ? ? ? ? ? ? ? ? ? 0, ???? ??(??, ??) ? ?? 1 0.5 + 0.5sin ? ??(??(??, ??) ? ?? 1 +?? 2 2 ) ?? 2 ? ?? 1 ? , ?????? 1 ? ??(??, ??) ? ?? 2 1 ? 0.25 ? ??(??, ??) ? ?? 2 ?? 3 ? ?? 2 ? 2 , ???? ?? 2 ? ??(??, ??) ? ?? 3 0.5 + 0.25 ? ?? 4 ? ??(??, ??) ?? 4 ? ?? 3 ? 2 , ???? ?? 3 ? ??(??, ??) ? ?? 4 1, ???? ??(??, ??) ? ?? 4 Where a 1 , a 2 , a 3 and a 4 are the parameters which determine the shape of the half open membership function. These parameters can be determined by some statistic values of w(i, j). Hence, the output value for the proposed filter based on adaptive fuzzy rules is: ??(??, ??) = ??[??(??, ??)] × ??(??, ??) + {1 ? ??[??(??, ??)]} × ??(??, ??) = ??(??, ??) + ??[??(??, ??)] × [??(??, ??) ? ??(??, ??)] # Global Journal of Computer Science and Technology Volume XI Issue IV Version I If the membership function ?[w(i, j)] =0, which indicates that the present pixel I(i, j) is pixel with no noise and it is not necessary to filter. The filter will provide the original pixel value and protect the image data. If the membership function ?[w(i, j)]=1, which indicates that the present pixel I(i, j) is affected exactly by impulse noise and it needs to be filtered. The filter will provide E(i, j) that is the estimation of the present pixel I(i, j). If the membership function 0 < ?[w(i, j)] < 1, which indicates that the present pixel has been affected partially by impulse noise. The filter will results the weighted average of I(i, j) and E(i, j). # IV. Experimental Results For experimenting the proposed filtering technique, several 512 X 512 grayscale images affected by the impulse noise (salt and pepper noise) with noise occurrence of 1% to 90% is considered. The result of the proposed filter is compared with several existing filters such as median filter and switching filter with different window size. The quantitative measures used for comparison is the Peak Signal-to-Noise Ratio (PSNR) between the original and restored images and average execution time. PSNR value is evaluated by using the following equation: ???????? = 10?????? 10 ? ? ? 255 2 ???1 ?? =0 ???1 ??=0 ? ? [??(??, ??) ? ??(??, ??)] 2 ???1 ?? =0 ???1 ??=0 ? Where {I(i, j)} and {Y (i, j)} are the original and restored images, respectively. Table 1 provides the comparison of the proposed filter with median filter (3X3 window size), median filter (5X5 window size) and SM filter (3X3 window size). The experimentation is performed at different noise level such as 1%, 5%, 10%, 20%, 40%, 60%, 80% and 90%. From the table 1, it can be observed that the PSNR value resulted in 80% noise affected image is 10.2 for the median filter of window size 3 X 3, 11.3 for the median filter of window size 5 X 5, 22.4 for the SM filter of window size 5 X 5, whereas it is higher for the proposed technique i.e., 26.9 for 3 X 3 window size, 27.3 for 5 X 5 window size and 27.5 for 7 X 7 window size. When the image is affected by higher noise i.e., 90%, other filters results only less PSNR value i.e., only 7.2% for median filter with window size 3 X 3, 8.6 for median filter with window size 5 X 5 and 15.9% for SM filter with window size 5 X 5, whereas, the proposed filter results in higher PSNR value i.e., 25.1% for window size 3 X 3, 25.4% for window size 5 X 5 and 25.6% for window size 7 X 7. When the overall PSNR is considered, the proposed filter shows better PSNR values when compared to the conventional filters. Table 2 shows the execution time taken for the proposed filter and the different existing image filters with the noise rate as 80%. From the table, it can be observed that execution time required for the median filter with 3 X 3 window size is 14 seconds, median filter with 5 X 5 window size is 16 seconds, SM with 5 X 5 window size is 20 seconds, whereas, the execution time required by the proposed technique is 10 seconds for 3 X 3 window size, 11 seconds for 5 X 5 window size and 13 seconds for 7 X 7 window size. This clearly indicates that the overall execution time required by the proposed filter is lesser when compared to the existing filters. # VI. Conclusion The adaptive fuzzy switching filter based on fuzzy logic is proposed in this paper. The proposed adaptive filter involves three phases. The first phase will identify the impulse noise by considering grayscale distribution among neighboring pixels. In the second phase, grayscale values for the pixels are found out based on the values of neighboring pixels. The final phase implements the fuzzy switching technique for further improvement in the image preservation. The half open fuzzy membership function is used in the proposed filtering technique. The proposed technique is experimented with 512 X 512 grayscale images with the noise occurrence of 1% to 90%. The experimental result shows that the proposed adaptive filter can remove the impulse noise effectively. The PSNR value obtained for the proposed technique is higher when compared to the existing filtering techniques. Also, the execution time is lesser when compared to the execution time resulted for the conventional filtering techniques. 1(Lena image)Noise Ratio1%5%10%20%40%60%80%90%FilterMedian Filter (3X3)31.3 29.625.923.220.913.610.27.2Median Filter (5X5)32.5 30.227.125.121.314.311.38.6SM Filter (5X5)33.6 31.929.327.524.522.418.215.9Proposed Filter (3X3)36.3 34.132.932.130.828.126.925.1Proposed Filter (5X5)36.8 34.733.232.431.228.527.325.4Proposed Filter (7X7)36.9 35.033.532.631.629.127.525.6 2FilterMedian Filter (3X3)Median Filter (5X5)SM Filter (5X5)Proposed Filter (3X3)Proposed Filter (5X5)Proposed Filter (7X7)Time (seconds)141620101113 March 2011An Adaptive Fuzzy Switching Filter for Images Corrupted by Impulse Noise ©2011 Global Journals Inc. (US) * Fuzzy Two-Step Filter for Impulse Noise Reduction From Color Images SSchulte VDe Witte MNachtegael DVan Der Weken EEKerre IEEE Transactions on Image Processing 15 11 2006 * An Impulse Noise Image Filter Using Fuzzy Sets SunZhong-Gui ChenJie MengGuang-Wu International Symposiums on Information Processing 2008 * High Performance Detection Filter for Impulse Noise Removal in Images ASAwad HMan Electronics Letters 44 3 2008 * Simple adaptive median filter for the removal of impulse noise from highly corrupted images HIbrahim NS PKong Theam Foo Ng IEEE Transactions on Consumer Electronics 54 4 2008 * Nonlinear filtering impulse noise removal from corrupted images DZhang ZhuoerShi HaixiangWang DJKouri DKHoffman International Conference on Image Processing 2000 3 * Center Weighted Median Filters and Their Applications to Image Enhancement SJKo YHLee IEEE Transaction on Circuits and Systems 38 9 1991 * Detail-Preserving Median Based Filters in Image Processing TSun YNeuvo Pattern Recognition Letters 15 4 1994 * Adaptive Impulse Detection Using Center-Weighted Median Filters TChen HRWu IEEE Signal Processing Letters 8 1 2001 * A New Efficient Approach for the Removal of Impulse Noise from Highly Corrupted Images EAbreu MLightstone SKMitra KArakawa IEEE Transaction on Image Processing 5 6 1996 * A Fuzzy Filter for Images Corrupted by Impulse Noise FRusso GRamponi IEEE Signal Processing Letters 3 6 1996 * A Robust Approach to Image Enhancement Based on Fuzzy Logic YSChoi RKrishnapuram IEEE Transaction on Image Processing 6 6 1997 * An Adaptive Neuro-Fuzzy System for Automatic Image Segmentation and Edge Detection VBoskovitz HGuterman IEEE Transactions on Fuzzy Systems 10 2 2002 * Progressive Switching Median Filter for the Removal of Impulse Noise from Highly Corrupted Images ZWang DZhang IEEE Transaction on Circuits and Systems-II: Analog and Digital Signal Processing 1999 46 * Salt and Pepper Impulse Noise Removal Using Adaptive Switching Median Filter KNallaperumal JVarghese SSaudia KArulmozhi KVelu SAnnam Processing of IEEE Oceans essing of IEEE Oceans 2006 * Selective Removal of Impulse Noise Based on Homogeneity Level Information GPok JLiu ASNair IEEE Transaction on Image Processing 12 1 2003 * Noise Reduction by Fuzzy Image Filtering DVan De Ville MNachtegael DVan Der Weken EEKerre WPhilips ILemahieu IEEE Transactions on Fuzzy Systems 11 4 2003 * Impulse Noise Suppression with an Augmentation of Ordered Difference Noise Detector and an Adaptive Variational Method ShoushuiChen XinYang GCao Global Journal of Computer Science and Technology 30 4 2009 Pattern Recognition Letters * An Adaptive Fuzzy Switching Filter for Images Corrupted by Impulse Noise March 2011