Noise is an important factor, which is mainly produced in the processes of image ... every day, such as Web pages, PDF files, captured screens, online games, ... remote clients, wireless projectors or thin clients, how to efficiently compress them has ..... across the image, tend to modify both noisy as well as noise free pixels,.
M.Jayamanmadharao et al. / International Journal of Engineering Science and Technology (IJEST)
IMPLEMENTATION OF OBJECT ORIENTED APPROCH FOR NOISE REDUCTION USING FUZZY LOGIC M.JAYAMANMADHARAO Professor, Department of EIE, AITAM, Tekkali, A.P., INDIA CHINTA SOMESWARA RAO Assistant Professor, Computer Science and Engineering, SRKR Engineering College, Bhimavaram, Andhra Pradesh, INDIA. DR. KVVS REDDY Professor, Department of ECE, AU College of Engineering, Andhra University, A.P., INDIA Abstract: Noise is an important factor, which is mainly produced in the processes of image acquirement and transmission that influences image quality. Noise reduction is necessary for image processing and image interpretation to acquire useful information from the influenced images. Because the working status of image transmitter is influenced by variety of factors, different noises can be dealt in different ways. This paper illustrates an object oriented approach for noise reduction using fuzzy filtering. This method filters the noise from images without disturbing original images. Results suggest that the methods used in this paper are suitable in filtering the noise. Keywords: Object oriented approach, Image Processing, Noise Reduction, Fuzzy logic. 1. Introduction With recent advances in electronic imaging, data processing systems, scanning devices and documents are now present a wide spectrum of printing systems. From offset printers to home desktop computers, documents in digital form became a common place [1]. Besides natural images, there are up to millions of artificial visual contents generated by computers every day, such as Web pages, PDF files, captured screens, online games, slides, and so on. These are very complicated and consist of text, graphics, and natural pictures. When images are displayed in remote clients, wireless projectors or thin clients, how to efficiently compress them has become a prevalent and critical problem in many applications [2]. Image noise [3] is generally regarded as an undesirable by-product of image captures. At the time of image capturing there are various types of noises are included in that image. Image filtering [4] is not only used to improve image quality but also is used as a pre-processing stage in many applications including image encoding, pattern recognition, image compression, and target tracking, to name a few [5]. Noise will decrease information of image. Noise reduction is used to recover the perfect image from a degraded copy of an image. In this paper we propose a generic solution to address this problem. First, the context of fuzzy image filtering will be reminded. Then, an object oriented approach to remove noise in various types of images using fuzzy filtering method is proposed. Finally, experiments illustrating the ability of the new method to detect structures in noisy images are commented.
ISSN : 0975-5462
Vol. 3 No. 3 March 2011
1899
M.Jayamanmadharao et al. / International Journal of Engineering Science and Technology (IJEST)
2. Related Work Most applications in computer vision and computer graphics involve the concept of image filtering to reduce noise and/or extract useful image structures. Simple explicit linear time invariant (LTI) filters like Gaussian filter, Laplacian filter, and Sobel filter are widely used in image blurring, edge detection, and feature extraction [6]. LTI filtering also includes the process of solving a Poisson Equation, such as in high dynamic range compression [7], image stitching [8], and image matting [9], where the filtering kernel is implicitly defined by the inverse of a homogenous Laplacian matrix. In this paper we propose an object oriented approach for noise, called fuzzy filter. The filtering output is locally a linear transform of the guidance image. This filter has the edge-preserving smoothing property like the bilateral filter, but does not suffer from the gradient reversal artifacts. It is also related to the matting Laplacian matrix [10], so is a more generic concept and is applicable in other applications beyond the scope of smoothing. Moreover, the guided filter has an O (N) time exact algorithm for both gray-scale and color images. Experiments show that their proposed filter performs very well in terms of both quality and efficiency in a great variety of applications, such as noise reduction, detail smoothing/enhancement, HDR compression, image feathering, haze removal, and joint up sampling. 2.1. Bilateral Filter The bilateral filter computes the filter output at a pixel as a weighted average of neighboring pixels. It smoothes the image while preserving edges. Due to this nice property, it has been widely used in noise reduction [11], HDR compression [12], multi-scale detail decomposition [13], and image abstraction [14]. It is generalized to the joint bilateral filter [15], in which the weights are computed from another guidance image rather than the filter input. The joint bilateral filter is particular favored when the filter input is not reliable to provide edge information However, it has been noticed [16, 17] that the bilateral filter may have the gradient reversal artifacts in detail decomposition and HDR compression. The reason is that when a pixel has few similar pixels around it, the Gaussian weighted average is unstable. Another issue concerning the bilateral filter is its efficiency. All the above methods require a high quantization degree to achieve satisfactory speed, but at the expense of quality degradation. In order to solve this, we propose an object oriented approach for noise removal. 3. Fuzzy Image Filtering The theory of the fuzzy sets operates with qualitative terms or linguistic variables that are characteristic of human descriptions, yet the theory gives these quantified values, which is characteristic of descriptions suitable for computer processing. Thus, the advantages of human knowledge and the computational power of computers are combined in this theory. Fuzzy logic, which serves as the basis for realizing the methods of fuzzy control, describes more naturally the character of human thought and understanding of the real world than do traditional formal logical systems. Because of this, the use of mathematical tools for representing of the fuzzy initial information allows us to construct models which reflect more adequately the different aspects of uncertainty that are continually present in reality. Zadeh et.al [18] notes that there have appeared computer systems which are able to solve problems in pattern recognition, speech recognition, handwriting recognition, voice recognition - in other words, solving problems which until recently were considered impracticable. Today, computer systems are able to identify fingerprints, face characteristics, hand geometry, etc. It is necessary to note that during the problem solving process using fuzzy logic methods, axioms or rules are introduced which are formulated mainly from the empirical human knowledge. In images, Fuzzy processing has two main properties: A fuzzy filter computes fuzzy derivative in such a way that it would be less sensitive to local changes of image structure, such as edges in the image. The fuzzy membership function is formulated so that it can adapt to the noise components for executing fuzzy smoothing [19]. The concept of image smoothing has a dual meaning. During correction of the signal defects, which are added by system taking the image, the smoothing removes the noise related to defects in system transmitting the image, such as additive, fluctuate, impulse, etc. During pre-processing of images, the smoothing is a removing of details, which impede the recognition or analysis of objects in the images. Building on ideas presented in [20] we will design a fuzzy filter for images. The main idea of the fuzzy filter is that the value of a pixel is re-defined depending on the values of neighboring pixels. The filter must differentiate effectively between noise and contour or edge lines in the image. In order to solve this problem for each pixel an evaluation level is calculated which characterizes how great or small the derivative is in a certain direction. Construction of the fuzzy filter is based on following observation: a small fuzzy derivative most likely
ISSN : 0975-5462
Vol. 3 No. 3 March 2011
1900
M.Jayamanmadharao et al. / International Journal of Engineering Science and Technology (IJEST)
is caused by noise, while a large fuzzy derivative most likely is caused by an edge in the image. The main concern of the proposed filter is to distinguish between local variations due to noise and image structure. Filtering procedure includes two stages: 1. Fuzzy derivative estimation; 2. Fuzzy smoothing. 3.1. Fuzzy Derivative Estimation According to approach proposed in [19, 20], we start by looking for the edges. We try to provide a robust estimate by applying fuzzy rules. Fig.1 (a) and (b) shows the 3×3 neighborhood of a pixel (x; y) and pixel values. NW N NE W (x, y) E SW S SE Fig 1. (a) Neighborhood of a central pixel(x, y)
I(x-1,y-1) I(x-1,y) I(x-1,y+1)
I(x,y-1) I(x, y) I(x,y+1)
I(x+1,y-1) I(x+1,y) I(x+1,y+1)
Fig 1. (b) Pixel values
A simple derivative at the central pixel position (x, y) value in the direction D ( D dir = {NW,W, SW, S, SE, E, NE, N} ) is defined as the difference between the value of the central pixel (x, y) and the value of one of the neighbor pixels in that direction D. This derivative value is denoted by δD (x; y).For example, (1) δN (x, y) = I (x, y-1) - I (x, y) or δNW (x, y) = I (x – 1, y - 1) - I (x, y) Next, the principle of the fuzzy derivative is based on the following observation. Consider an edge passing through the neighborhoods of a pixel (x, y) in the direction SW, NE. The derivative value δNW (x, y) will be large, but also derivative values of neighboring pixels perpendicular to the edge’s direction can expected to be large. For example, in NW - direction we can calculate the derivative values δNW (x, y), δNW (x – 1, y + 1) and δNW (x + 1, y - 1). To compute the value that expresses the degree to which the fuzzy derivative in a certain direction is small, we will make use of the fuzzy set small. The membership function µK (u) for the property small is the following:
1
µ
| |
| |
,0
,
(2)
0, | |
Where K is an adaptive parameter. The graph of this expression is shown in Fig.2 (a). 1
1
-K
1
K (a)
L (b)
-L (c)
Fig 2. Membership functions for the fuzzy terms (a) small,(b) positive and (c) negative
The degree of membership of the fuzzy derivatives (x; y) for the pixel (x, y) in all directions D calculated by applying the fuzzy rules as shown in the Table 1.
dir is
3.2. Fuzzy Smoothing The fuzzy filtering of the image reduces noise components of pixels by means of correction of pixel values. We describe this in terms of a correction term δ. To compute correction term δ for the processed pixel value, we use a pair of fuzzy rules for each direction. The idea behind the rules is the following: If no edge is assumed to be present in a certain direction (edge assumption part), the derivative value in that direction can and will be used to calculate the correction term δ (filtering part). Edge assumption part can be realized by using the fuzzy derivative value, for filtering part we will have to distinguish between positive and negative values. Table 2 contains the rules used to calculate these values.
ISSN : 0975-5462
Vol. 3 No. 3 March 2011
1901
M.Jayamanmadharao et al. / International Journal of Engineering Science and Technology (IJEST)
NW W SW S SE E NE N
Table 1 Fuzzy rules used to calculate fuzzy derivations If (δNW(x,y) is small and δNW(x-1,y+1) is small) or (δNW(x,y) is small and δNW(x+1,y-1) is small) or is small. (δNW(x-1,y+1) is small) and (δNW(x+1,y-1) is small) then If (δW(x,y) is small and δW(x,y+1) is small) or (δW(x,y) is small and δW(x,y-1) is small) or (δW(x,y+1) is is small. small) and (δNW(x,y-1) is small) then If (δSW(x,y) is small and δSW(x+1,y+1) is small) or (δSW(x,y) is small and δSW(x-1,y-1) is small) or is small. (δSW(x+1,y+1) is small) and (δSW(x-1,y-1) is small) then If (δS(x,y) is small and δS(x-1,y) is small) or (δS(x,y) is small and δS(x+1,y) is small) or (δS(x-1,y) is is small. small) and (δS(x+1,y) is small) then If (δSE(x,y) is small and δSE(x-1,y+1) is small) or (δSE(x,y) is small and δSE(x+1,y-1) is small) or (δSE(xis small. 1,y+1) is small) and (δSE(x+1,y-1) is small) then If (δE(x,y) is small and δE(x,y-1) is small) or (δE(x,y) is small and δE(x,y+1) is small) or (δE(x,y-1) is small) and (δE(x,y+1) is small) then is small. If (δNE(x,y) is small and δNE(x-1,y-1) is small) or (δNE(x,y) is small and δNE(x+1,y+1) is small) or is small. (δNE(x-1,y-1) is small) and (δNE(x+1,y+1) is small) then If (δN(x,y) is small and δN(x-1,y) is small) or (δN(x,y) is small and δNE(x+1,y) is small) or (δNE(x-1,y) is is small. small) and (δNE(x+1,y) is small) then
Table 2 Two positive rules used to calculate the positive and negative values for all the directions NW if (x,y) is small and δNW(x,y) is positive then correction term is positive if (x,y) is small and δNW(x,y) is negative then correction term is negative W if (x,y) is small and δW(x,y) is positive then correction term is positive if (x,y) is small and δW(x,y) is negative then correction term is negative SW if (x,y) is small and δSW(x,y) is positive then correction term is positive if (x,y) is small and δSW(x,y) is negative then correction term is negative S if (x,y) is small and δS(x,y) is positive then correction term is positive if (x,y) is small and δS(x,y) is negative then correction term is negative SE if (x,y) is small and δSE(x,y) is positive then correction term is positive if (x,y) is small and δSE(x,y)is negative then correction term is negative E if (x,y) is small and δE(x,y) is positive then correction term is positive if (x,y) is small and δE(x,y) is negative then correction term is negative NE if (x,y) is small and δNE(x,y) is positive then correction term is positive if (x,y) is small and δNE(x,y) is negative then correction term is negative N if (x,y) is small and δN(x,y) is positive then correction term is positive if (x,y) is small and δN(x,y) is negative then correction term is negative
For the properties positive and negative, we also use linear membership functions (Fig. 2 b and c). Again, we implement the AND-operator and OR-operator by respectively the minimum and maximum. This can be done for each direction. The final step in the computation of the fuzzy filter is the defuzzification. We are interested in obtaining a correction term δ, which can be added to the pixel value of location (x, y). Therefore, the truthiness of the rules and , D dir (so for all directions) are aggregated and rescaling the mean truthiness as follows:
3
8
Where dir contains the directions and L represents the number of gray levels. So, each direction contributes to the correction term δ. 4. Implementation of the Fuzzy Image Filtering Portable Gray Map (PGM) is a standard bitmap based format consisting of a 4 lines header, and data stored in the unsigned char type, providing a maximum of 256 gray scale levels or 8-bit data per pixel. The general structure of a PGM image file the header of a PGM image file consists of: First line containing the signature of the image file and identifies the file as PGM Second line is the comment line Third line provides information about number and rows and columns of data stored in the file, and Fourth line specifies maximum gray level contained in the image
ISSN : 0975-5462
Vol. 3 No. 3 March 2011
1902
M.Jayamanmadharao et al. / International Journal of Engineering Science and Technology (IJEST)
4.1. Mean Filter Module Mean filtering is a simple, intuitive and easy to implement method of smoothing images, i.e. reducing the amount of intensity variation between one pixel and the next. It is often used to reduce noise in images. The idea of mean filtering is simply to replace each pixel value in an image with the mean (`average') value of its neighbors, including itself. This has the effect of eliminating pixel values which are unrepresentative of their surroundings. Mean filtering is usually thought of as a convolution filter. Like other convolutions it is based around a kernel, which represents the shape and size of the neighborhoods to be sampled when calculating the mean. 4.2. Median Filter Module The median filter and its variants are among the most commonly used filters for impulse noise removal. The median filters, when applied uniformly across the image, tend to modify both noisy as well as noise free pixels, resulting in blurred and distorted features. Recently, some modified forms of the median filter have been proposed to overcome these limitations. In these variants of the median filter, the pixel value is modified only when it is found corrupted with noise. The median filter is used to remove noise from an image by replacing pixels with the middle pixel value selected from a certain window size. The median filter is very effective at removing noise while not destroying sharp edges in an image. The general idea behind the filter is to average a pixel using other pixel values from its neighborhoods, but simultaneously to take care of important image structures. The main concern of the proposed filter is to distinguish between local variations due to noise and due to image structure. In order to accomplish this, for each pixel we derive a value that expresses the degree in which the derivative in a certain direction is small. Such a value is derived for each direction corresponding to the neighboring pixels of the processed pixel by a fuzzy rule. 4.3. Fuzzy Filter Module In this paper we propose a method to reduce the Gaussian noise using fuzzy filtering mechanism. Implementation consists of two phases: First, fuzzy derivative estimation; Second, fuzzy smoothing Fuzzy Derivative Estimation: This estimating derivatives and filtering can be seen as a chicken-and-egg problem; for filtering we want a good indication of the edges, while to find these edges we need filtering. Fuzzy Smoothing: To compute the correction term for the processed pixel value, we use a pair of fuzzy rules in each direction mentioned in the above said tables. 5. Case Study To demonstrate the effect of the fuzzy filtering we have made implementations using JAVA 1.6. In order to test this proposed method two images were distorted with Gaussian noise. The first one was the picture of Lena which has a simple texture. The second image was the picture of ship which contains more details and was degraded with noise. We have tested the fuzzy filtering method on a number of PGM images. In the implementation process, we have achieved different results from practically ideal images. Besides some implementations have not improved but at the same time they have not decreased the quality of the images before fuzzy filtering.
Fig 3. Noise reduction using Mean filter method
ISSN : 0975-5462
Vol. 3 No. 3 March 2011
1903
M.Jayamanmadharao et al. / International Journal of Engineering Science and Technology (IJEST)
Fig 4. Noise reduction using Median filter method
Fig 5. Noise reduction using Fuzzy filter method
From the above figures 3, 4, 5 clearly observe that The result of applying different filters to the picture of Lena is compared in Figure 3 and 4, As you can see Mean and Median filters are not so effective in image restoration and they cause a great deal of blurring. Meanwhile the wiener filter is effective in noise removal but still has large degree of blurring. Fuzzy filter not only is effective in removing the noise but also produces a sharper image. Here the fuzzy filter performs more effectively in removing the noise and the resulting image preserves a great amount of the detail. 6. Conclusions This paper proposed a new fuzzy filter for additive Gaussian noise reduction using an object oriented approach. The main feature of the proposed filter is that it tries to determine corrupted pixels to reduce their contribution in smoothing process. Hence it performs fuzzy smoothing by the previous knowledge of the pixels. We performed some experiments in order to demonstrate the effectiveness of the proposed filtering approach. The fuzzy filter is able to compete with state-of-the-art filter techniques for noise reduction. References [1] [2] [3] [4] [5] [6] [7] [8]
De queiroz, Ricardo L, Buckley, Robert R, Xu, Ming(1999) “l-Mixed raster content (MRC) model for compound image compression”, Proceedings on Visual Communications and Image Processing, pp. 1106-1117. Cuiling Lan, Feng Wu, Guangming Shi,(2009) “Compress Compound Images in H.264/MPEG-4 AVC by Fully Exploiting Spatial Correlation”, IEEE International Symposium on Circuits and Systems, pp- 2818 – 2821. Harish Kundra , Monika Verma & Aashima, (2009) “Filter For Removal Of Impulse Noise By Using Fuzzy Logic”, International Journal of Computer Science and Security, pp-195-202. Chi Chang-yanab, Zhang Ji-xiana, Liu Zheng-juna (2008), “Study On Methods Of Noise Reduction In A Stripped Image”, The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, pp-213-216. Mahmoud Saeidi, Khadijeh Saeidi, Mahmoud Khaleghi (2008), “Noise Reduction in Image Sequences using an Effective Fuzzy Algorithm”, World Academy of Science, Engineering and Technology,pp.351-356. Gonzalez, R.C., Woods, R.E.(2002), “Digital Image Processing”, 2nd Edition, Prentice Hall. Fattal, R., Lischinski, D., Werman, M (2002), “Gradient domain high dynamic range compression”, Proceedings of Computer graphics and interactive techniques,vol-6, pp. 249 – 256. Patrick Perez,Michel Gangnet,Andrew Blake(2003), “Poisson image editing”, ACM Transactions on Graphics, vol-22, pp. 313 - 318.
ISSN : 0975-5462
Vol. 3 No. 3 March 2011
1904
M.Jayamanmadharao et al. / International Journal of Engineering Science and Technology (IJEST)
[9] Sun, J., Jia, J., Tang, C.K., Shum, H.Y(2004), “Poisson matting” ACM Transactions on Graphics, vol-23, pp. 315 – 321. [10] Anat Levin, Dani Lischinski, Yair Weiss(2006), “A Closed Form Solution to Natural Image Matting”, Proceedings on Computer Vision and Pattern Recognition , pp.61-68. [11] Ce Liu,William T. Freeman,Richard Szeliski,Sing Bing Kang(2006), “Noise estimation from a single image,” Proceedings on Computer Vision and Pattern Recognition, pp. 901 – 908. [12] Durand, F., Dorsey, J.(2002), “Fast bilateral filtering for the display of high-dynamic-range images, ” ACM Transactions on Graphics, vol-21, pp. 257 - 266. [13] Fattal, R., Agrawala, M., Rusinkiewicz, S(2007), “Multiscale shape and detail enhancement from multi-light image collections” ACM Transactions on Graphics,vol-26, pp.377-441. [14] Winnemoller, H., Olsen, S.C., Gooch, B. (2006), “Real-time video abstraction”. ACM Transactions on, vol- 25, pp. 1221 - 1226. [15] Petschnigg, G., Agrawala, M., Hoppe, H., Szeliski, R., Cohen, M., Toyama, K.(2004), “Digital photography with flash and no-flash image pairs” ACM Transactions on Graphics, vol-23, pp. 664 - 672. [16] Durand, F., Dorsey, J.(2002), “ Fast bilateral filtering for the display of high-dynamic-range images” ACM Transactions on Graphics. [17] Bae, S., Paris, S., Durand, F(2006), “Two-scale tone management for photographic look”, ACM Transactions on Graphics,vol-25, pp.637 – 645. [18] Zadeh L.(2001), “Foreword - Recognition Technology and Fuzzy Logic”, IEEE Transactions on Fuzzy Systems.. [19] Rosenfeld A. and Kak A.C. “Digital Picture Processing”, 2nd Edition, Academic Press, New York. [20] Van De Ville D., Nachtegael M., Van der Weken D., Kerre E., Philips W. and Lemahieu I.(2003), “Noise Reduction by Fuzzy Image Filtering”, IEEE Trans. on Fuzzy Systems, pp.429-436.
ISSN : 0975-5462
Vol. 3 No. 3 March 2011
1905