Simple Impulse Noise Cancellation Based on Fuzzy Logic Chung-Bin Wu, Bin-Da Liu, and Jar-Ferr Yang wcb@spic.ee.ncku.edu.tw, bdliu@cad.ee.ncku.edu.tw, fyang@ee.ncku.edu.tw Department of Electrical Engineering National Cheng Kung University, Tainan, Taiwan 70101, R. O. C. Abstract In this paper, we propose a simple fuzzy-based algorithm to remove the impulse noise from images. To achieve real-time applications, the proposed filter architecture, which combines fuzzy noise detection and noise filtering, is also designed. With low computational complexity, simulation results show that the proposed filters can effectively remove the impulse noise. Keywords: Fuzzy-logic-control filter, Impulse noise, Noise cancellation. I. Introduction There are two types of noise that can possibly contaminate images during analog transmission or storage. When the received or stored signal level is too low, the incorporated noise is mostly Gaussian type. However, the most annoying noise, which can degrade the image quality under any condition, is impulse noise. Various restoration techniques have been proposed for the removal of impulse noise. Usually, linear filters produce serious image blurring while removing the impulse noise. Generally, a good impulse noise cancellation scheme should suppress the noise while preserving the edges and the image details. With this consideration, nonlinear techniques provide more satisfactory results than linear approaches. Nonlinear methods, including median filters [1-3], frame average or line average filters [4-7], rank-order filters [8], and fuzzy-logic-control filters [9-12] with different computational complexities and memory requirements can effectively remove the impulse noise and maintain sharp edges. For example, a median filter usually requires a complicated ordering circuit, especially for a large window size. Recent suggested median filters have [13-14]. Zhang et al. [15] used a two-step digital image-processing scheme to filter out the impulse noise. In order to achieve the line map for impulse noise identification, this scheme requires one field buffer and three line-buffers. Fuzzy set theory methods with the capability to efficiently represent the input/output relationships of dynamic systems have gained attention, especially in pattern recognition and computer vision applications [16]-[19]. Hence, there have been many efforts to develop a fuzzy filter for signal/image processing. Russo [9], 279
[20]-[27] and Farzam [11] proposed fuzzy logic filters to receive promising results for image enhancement. In [9] and [11], fuzzy rules were used for detecting noise and preserving images. However, most of the fuzzy logic filters are inefficient and time-consuming in real time applications. In the TV receiver set, which receives transmitted analog images, a trade-off must be made among its hardware cost, operating speed, and image quality. In this paper, we propose a new nonlinear filter, based on a simple fuzzy-based detection, to effectively maintain image quality after the removal of impulse noises. In Section II, we propose a fuzzy-logic noise detection and threshold filter. Simulation results show that this noise detection system performs better in removing impulse noises than the traditional median filter, which requires complex hardware. In Section III, the architecture for the proposed filter is designed. A short summary of this paper is provided in Section IV. II. The Fuzzy Based Average and Threshold Filter The intensity of an impulse noise impaired pixel is usually much larger (or smaller) than that in the surrounding pixels. When a small window is centered at an impulse-impaired pixel, the effect of the impulse noise is observed after an average filter is applied. With this concept in mind, we propose a fuzzy based nonlinear filter to reduce the impulse noise based on an N N block-processing unit. Figure 1 shows a 3 3 processing block in which the corresponding 8 pixels are labeled from P 1 to P 8 and the center pixel is labeled P 0. In order to avoid reducing the resolution of TV pictures in the direct replacement, which could possess the same disadvantage as most average filters, a fuzzy noise-detecting unit was adopted. The ideal detail-preserving processor for impulse noise removal can detect a noise pixel by estimating the disparity in the original gray level of a noise pixel from the averaged gray level of the neighboring pixels [28]. The restoration process can be divided into two steps. In the first step, the pixel at the center of the block is detected by the designed noise detector. If the noise detector identifies a pixel with no impulse noise, it is left unchanged. Once the noise detector locates a pixel corrupted by impulse noise, the original gray level of the noise pixel is estimated from the neighboring pixels in the second step. To detect impulse noise, a fuzzy-based average threshold (FAT) filter is proposed to restore the image. In order to implement fuzzy reasoning, triangular shaped fuzzy sets are described using a two-parameter membership function m D (u) 0, u t1 u) = ( u t1) /( w t1), t < u < w (1) 1, u w m D ( 1 where w defines the half width of the fuzzy set and t 1 is designed as a threshold value. To achieve real time applications, we choose w and t 1 as 128 and 32, respectively. Fuzzy reasoning resorts to a set of rules in order to detect noise pulses. For the 280
proposed operator, a fuzzy set labeled noise detector (ND) is adopted to detect the noise using the membership function in (1). The noise detection algorithm is based on a simple fuzzy rule, shown as follows: IF( x1,nd) OR ( x2, ND)OR ( x3, ND) THEN ( y, ND) (2) where x = P P denotes the avg 0 luminance differences and y the output. Since TV signals are transmitted in line scanning format to the receiver, the probability that impulse noise will occur simultaneously in the vertical direction is very small. The vertical average signal can be used as a noise detection reference. For a simple hardware design, we compute Pavg P as ( P1 + 2P4 + P6 ) / 4, = 1 = ( P2 + P7 ) / 2, = 2 ( P3 + 2P5 + P8 ) / 4, = 3 avg (3) Because the factors 1/4 and 1/2 can be realized using 2-bit and 1-bit shifters, rule (2) exploits the luminance difference and x 1, x 2, x 3 are the inputs for (1) detecting a noise pulse in the 0 position. If a pixel is detected as non-impulse noise, the pixel will not need any processing. If the pixel in the center is detected as impaired with impulse noise, it will be replaced by a new estimated value. The output y can be obtained as follows: P0 y = P0 where + (( w t1) λ + t (( w t ) λ + t 1 1 1, if ( P, if ( P avg avg P ) > 0 0 P ) < 0 0 (4) λ = MAX { m ( x ); = 1, 2, 3} (5) D Figure 2 depicts the detailed flow diagram of the FAT filter. In different image communication channels, different impulse noises might be generated in terms of the pulse intensity and duration. In order to achieve the optimal restoration of the impaired picture, the threshold of the impulse noise must be adusted according to the noise characteristics using the proposed simple fuzzy reasoning algorithm. From (2), it can be observed that the proposed fuzzy algorithm with only one fuzzy rule is less than those suggested in [9] with 26 rules for every processed block and suitable for hardware implementation. To verify the proposed filter algorithm, the Lady image with various impulse noise ratios was generated as the input for the FAT impulse noise filter. The noise image model was simulated by randomly adding extremely light or dark gray level pixels. At the same time, the traditional median filters with window sizes of 7 and 9 (with 3x3 block) were also adopted in the simulations for references. Table 1 shows the PSNR values achieved by the median, the fuzzy-based filter [9] and the proposed FAT filter. It shows that the proposed FAT filter is better than the traditional median filters and fuzzy-based filter [9] when the impulse noise ratio is less than 4.37%. With highly corrupted noise, corrupted by more than 5.05% impulse noise, the performance of the proposed method is a little worse than the fuzzy-based filter [9] but still better than 281
the traditional median methods. In addition, the proposed FAT filters require less computation than the fuzzy filters [9], [11] which require 26 fuzzy rules or more for every processed pixel. Figures 3(a), (b), (c), (d) and (e) show the original, the impulse-noise impaired, the nine-point median filtered, the fuzzy-based filter [9] and the FAT filtered Lady images, respectively, when the ratio of impulse noise is 5.05%. The proposed FAT filter, which has less computation and achieves better performance than the median filters and fuzzy-based filter [9], should be a good impulse noise removal. III. Realization of FAT Filter In this section, we present the hardware design for the FAT filter implementation. Figure 4 demonstrates the architecture of the proposed FAT filter. For a 3 3 processing unit, we need two line buffers after the analog video signal is sampled by the A/D converter. Figure 5(a) shows the relation among the three image data processed lines as the input for the noise reduction kernel depicted in Fig. 6, where a i, b i, and c i denote the image pixels that come from the A/D converter and the two line buffers, respectively. Since every window contains nine points, we can compute the average value, P in each cycle. In the first and avg third clock cycles, we calculate the summations of the three column pixels. However, in the second clock cycle, ust two pixels are taken into account. Since we adopted a 3 3 sample window, we established pipeline architecture to improve the processing speed, as shown in Fig. 5(b). In this architecture, only two adders, one 1-bit shifter for dividing by 2 and one 2-bit shifter for dividing by 4 are required. Figure 7 shows the function blocks for the FAT filter, which involve noise detection and noise filtering. Because the pipeline structure was used in the in previous stage, we can obtain SA for every clock cycle and calculate the difference value x i easily using an abstract subtractor. An accumulative comparator is used to find the maximum value in Fig. 7. If the current value is larger than the held value, it will replace the current value and store it, otherwise the maximum value will be held. The function block m D (u) is used to calculate the function of m D (u) as presented in the previous section. The function block y is regarded as a filtering output. If the noise is detected, the output will be replaced by y, otherwise, the current pixel will be output. To design easily, in this hardware implementation, we chose the closest neighboring pixel to the current vertical average value in the processing block as output y. IV. Conclusion In order to improve the image and simplify the computational complexity, we proposed a FAT nonlinear filter for traditional analog video receivers. To evaluate the proposed algorithm, we added various percentages of impulse noise to the original images. Simulation results show 282
that the proposed FAT filter achieves better performance in comparison to the well-known median filters. The proposed filter requires lower computational complexity than the later in hardware. A corresponding architecture for impulse noise cancellation was also proposed. References [1] J. Siu, J. Li and S. Luthi, A real time 2-D median based filter for video signals, IEEE Trans. Consumer Electron. vol. 399, no. 2, pp. 115-121, May 1993. [2] C. K. Kuo, C. H. Lin, and J. H. Leu, Noise reduction and concealment for block encoder images, IEEE Trans. Consumer Electron. vol. 40, no. 3, pp. 514-520, Nov. 1994. [3] T. Kaspairs, and J. Lane, Adaptive scratch noise filtering, IEEE Trans. Consumer Electron. vol. 39, no. 4, pp. 917-921, Nov. 1993. [4] J. Salo, Y. Neuvo and V. Hameenaho, Improving TV picture quality with linear-median type operations, IEEE Trans. Consumer Electron., vol. 34, no. 3, pp. 73-80, Aug. 1988. [5] Y. Nakaima, T. Hamasaki, M. Nakayama, and Y. Kitamura, A new noise reduction for video camera, IEEE Trans. Consumer Electron., vol. 37, no. 3, pp. 213-219, Aug. 1991. [6] S. Y. Park and Y. H. Lee, Double smoothing of images using median and wiener filters, IEEE Trans. Acoust., Speech, Signal Processing, vol. 37, no. 6, June 1980. [7] S. Inamori, S. Yamauchi, and K. Fukuhara, A method of noise reduction on image processing, IEEE Trans. Consumer Electron., vol. 39, no. 4, pp. 801-805, Nov. 1993. [8] R. C. Hardie and G. R. Arce, Ranking in R P and its use in multivariate image estimation, IEEE Trans. Circuits Syst. Video Technol., vol. I, no.2, pp. 197-209, June 1991. [9] F. Russo and G. Ramponi, A fuzzy filter for image corrupted by image noise, IEEE Signal Processing Lett., vol.3, no.6, pp. 168-170 June 1996. [10] F. Russo, Edge detection in noisy images using fuzzy reasoning, IEEE Trans. Instru. Meas., vol. 47, no.5, pp. 1102-1105, Oct. 1998. [11] F. Farbiz, M.B. Menha, S. A. Motamedi, and M. T. Hagan, A new fuzzy logic filter for image enhancement, IEEE Trans. Syst. Man, Cybern.- part B: Cybern., vol. 30, no. 1, pp. 110-119, Feb. 2000. [12] Y. Choi, and R. Krishnapuram, A robust approach to image enhancement based on fuzzy logic, IEEE Trans. Image Processing, vol. 6, no. 6, pp. 808-825, June 1997. [13] J. Siu, J. Li and S. Luthi, A real-time 2-D median based filter for video signals, IEEE Trans. Consumer Electron., vol. 39, no. 2, pp. 115-121, May, 1993. [14] S. B Lee, A. Ortiz, R. F. Lepard, S. R. Shaw, and J. L. Kirtley, Applications of real-time median filtering with fast digital and analog sorters, IEEE/ASAM Trans. Mechatronics, vol. 2, no. 2, pp. 283
136-143, June 1997. [15] Q. Zhang, and R. Ward, Automatic assessment of signal-to-thermal noise of television images, IEEE Trans. Consumer Electron., vol. 41, no. 1, pp. 108-116, Feb. 1995. [16] J. C. Bezdeck and S. K. Pal, Eds., Fuzzy Models for Pattern Recognition, New York: IEEE Press, 1992. [17] S. K. Pal, Fuzzy sets in image processing and recognition, in Proc. IEEE 1st Int. Conf. Fuzzy Syst., 1992, pp. 119 126. [18] R. Krishnapuram and M. Keller, Fuzzy sets theoretic approach to computer vision: An overview, in Proc. IEEE 1st Int. Conf. Fuzzy Syst., 1992, pp. 135 142. [19] J. S. Kim and H. S. Cho, A fuzzy logic and neural network approach to boundary detection for noisy imagery, Fuzzy Sets Syst., vol. 65, pp.141 159, Aug. 1994. [20] F. Russo and G. Ramponi, Edge detection by FIRE operators, in Proc. IEEE 3rd Int. Conf. Fuzzy Syst., 1994, pp. 249 253. [21] ----, Combined FIRE filters for image enhancement, in Proc. IEEE 3rd Int. Conf. Fuzzy Syst., 1994, pp. 261 264. [22] F. Russo and G. Ramponi, Fuzzy operator for sharpening of noisy images, Electron Lett., vol. 28, pp. 1715 1717, Aug. 1992. [23] F. Russo, A user-friendly research tool for image processing with fuzzy rules, in Proc. IEEE 1st Int. Conf. Fuzzy Syst., 1992, pp. 561 568. [24] F. Russo and G. Ramponi, Nonlinear fuzzy operators for image processing, Signal Processing, vol. 38, pp. 429 440, Aug. 1994. [25] ---, A noise smoother using cascaded FIRE filters, in Proc. IEEE 4th Int. Conf. Fuzzy Syst., vol. 1, 1995, pp. 351 358. [26] ---, An image enhancement technique based on the FIRE operator, in Proc. IEEE 2nd Int. Conf. Image Processing, vol. 1, 1995, pp. 155 158. [27] ---, Removal of impulsive noise using a FIRE filter, in Proc. IEEE 3rd Int. Conf. Image Processing, vol. 2, 1996, pp. 975 978. [28] T. H. Yu, S. K. Mitra, Detail-Preserving impulse noise removal of images using modified dynamic programming, IEEE Trans. Acoust., Speech, Signal Processing, vol. 4, no. 2, pp. 181-4, April 1990. Table 1. PSNRs for Lady image Method Noise (%) Median Filter Length 7 9 Fuzzy filter [9] FAT Filters 26 rules 1 rule 3 3 block 3 3 block 0.99 33.58 35.45 34.83 38.18 2.42 32.79 34.84 34.70 36.32 3.26 32.18 34.37 34.57 35.24 4.37 31.29 33.68 34.44 34.55 5.05 31.80 33.57 34.33 33.74 284
-1 i-1 i i+1 P1 P2 P3 P4 P0 P5 +1 P6 P7 P8 Fig. 1 The nine-element processing window (c) Output from night-points median filter Image Image Data Data (Impulse noise noise corrupted) Window Mask (3x3 pixels) Compute P avg t 1 P avg noise? no Yes (d) Output from fuzzy filter [9] Output = P 0 yes Output =y Fig. 2 Basic block diagram for proposed filter (a) Original image Lady (e) Output from FAT filter Fig. 3 Simulation results: (a) Original image Lady ; (b) Adding 5.05% impulse noise; (c) Output from night-points median filter; (d) Output from fuzzy filter [9]; (e) Output from FAT filter. Video Images A/D Line Buffer 1 FAT FAT Noise Noise Reduction Reduction Kernel Kernel D/A Output Images Line Buffer 2 (b) Adding 5.05% impulse noise Fig. 4 Proposed architecture of the FAT filter Kernel
a6 a5 a4 a3 a2 a1 a0 from A/D b6 b5 b4 b3 b2 b1 b0 from LB1 c6 c5 c4 c3 c2 c1 c0 from LB2 SAi bi - x i m Det (u) Det (u) m Det (x i ) Accumulative Comparator Latch ck6 ck5 ck4 ck3 ck2 ck1 ck0 clock t 1 Fig. 5(a) Image data and processing windows y y Output S 2 S 1 ck0: a0+2 b0+c0 a0+c0 ck1: a1+2 b1+c1 a1+c1 ck2: a2+2 b2+c2 a2+c2 ck3: a3+2 b3+c3 a3+c3 ck4: a4+2 b4+c4 a4+c4 ck5: a5+2 b5+c5 a5+c5 Fig. 7 Fuzzy-Based Noise Detection and Filtering window1: window2: window3: Fig. 5(b) Operation of the Data flow ai ci bi x2 Shift Register ADD1 ADD2 S 1 S 2 4 SA1 2 4 SA2 SA3 Noise Noise Detection and and Filtering Output Fig. 6 FAT filter processing kernel 286