IMPROVED WAVELET-BASED IMAGE DENOISING ALGORITHM USING ITERATIVE CENTER WEIGHTED MEDIAN FILTER S. M. Mahbubur RahmanI and Md. Kamrul Hasanl 1 Department of Electrical and Electronic Engineering, Bangladesh University of Engineering and Technology, Dhaka-lOOO,Bangladesh e-mail:
[email protected]
ABSTRACT A new median filter termed as iterative center weighted median filter (ICWMF) in the wavelet coefficient domain is proposed for image denoising. The proposed filter iteratively smoothes the noisy wavelet coefficients' variances preserving the edge information contained in the large magnitude wavelet coefficients. The variance field estimated using the ICWMF is used in a minimum mean square error (MMSE) estimator to restore the noisy image wavelet coefficients. Simulation results show that higher peak signal to noise ratio (PSNR) can be obtained as compared to the other recent image denoising methods.
1. INTRODUCTION The application of wavelet transform in image denoising has shown significant success in recent years [1]-[6]. Denoising by the wavelet shrinkage method proposed in [1] provides an asymptotically minimax-optimal solution. But many image denoising techniques prefer MMSE metric [2J-[6]. Assuming transform coefficients within subbands are independently identically distributed (i.i.d.) random variables with generalized Gaussian (GG) distribution, an MMSE estimator performs better than wavelet threshold methods [2J. However, such assumption ma.y not be realistic, considering the statistics of wavelet coefficients of natural images. The wavelet coefficients within subbands are, infact, locally stationary and have dependency both in scale and across scales [2], [3]. Considering such dependency, wavelet coefficients within each subband should be modeled as independent Gaussian random variables with zero-mean and slowly varying variance [4], [5] rather than GG distribution [6]. An estimated variance field using the Bayes-rule with a single exponential prior, inferred from the approximate histogram of the true image coefficients in each scale, as in [5] is a crude one especially in the finest scale for two reasons. First, the assumed prior neglects the high frequency occurance of very low magnitude coefficients in the histogram. Sec-
ond, the local statistics of the signal or noise is not the same as that of the whole subband. This paper proposes a new smoothing process for improved denoising performance using an iterative center weighted median filter (ICWMF) on a preliminary estimated variance field. The key idea of the smoothing process is to suppress more noise from a preliminary estimates without loosing the image features. The preliminary estimation is performed using the proposed methods in [4]' [5]. For re-estimation of the variance field, first, we classify the overall scales as the noise dominant scales and the signal dominant scales exploiting inter scale statistics. The ICWMF is operated only on the noise dominant scales. Due to the presence of a trace of signal in these scales, the proposed ICWMF is designed as a special type of median filter that intelligently identifies the signal dominant regions from the noise dominated ones, and adapts itself in a predefined way. Since energy of the wavelet coefficients is an indicator of the image features like edges, textures, and smooth regions, during smoothing process we compare the center value within the mask to a prescribed threshold level to identify the signal or noise dominant regions in a scale, and hence the filter is termed as the iterative center weighted median filter (ICWMF). Finally, the variance field estimated from the ICWMF is used in a MMSE estimator for denoising wavelet coef· ficients.
2. DENOISING BY PROPOSED ICWMF 2.1. Overview of statistical model~ Considering the spatial clusters, coefficients within each band can be globally modeled as independent Gaussian random variables with zero-mean and slowly varying variance field [4J, [5J. To obtain better accuracy, by an additional smoothing, we consider the absolute value of the wavelet coefficients as a measure of the image features. For inter scale modeling, we take a relation, that represents the average signal level distribution across scales. The standard deviation of the coefficients in
304
each band represents the average signal level in that scale. Since most of the images have smooth regions with some edges and textures, it is expected that signal power decreases exponentially across the scales. That means, if X, is the average of three standard deviations of the wavelet coefficients of the three high subbands H Hit H L" LB" for a given scale s, then X, should have an exponential distribution across scales. The plot of X, across scales for different images is shown in Fig. 1. A normalized function r(s) = C /3' ,/3 > 1 or r(s) = CsP may be used to match such distribution, with C being a suitable constant, /3 denotes a base parameter, and p is an integer exponent. For a number of images it is found that r(s) = C/3' with /3 = 2 shows the best match in the least-square sense.
--
0.8
-.-l ...• 1..(
iii
...
0.7
-.-MA,I
c:
-'Y-
g••
0.6
.~
0.5
'0 '0 Co
MIndrlI
P (k) - ci,2(k)G (k) _ ,
-.
ci,2(k) ( -. 0', 2(k) + Un2 G, k)
Ug,2(k)'
2.3.
Estimation
of the underlying
··.··nl).C •••
}::~: ,.,:,~
1
..~ .. 3
4
Scale of the wavelet coefficients, s
Fig. 1. Average signal level distribution across scales for different images (solid line: distribution of X,; dashed line: r(s) = C/3' distribution; dotted line: r(s) = CsP distribution). 2.2. Denoising
field
j
~
L
jeN(Ic)
G;(j)
(2)
Here, it is assumed that noisy coefficients G.(j) have a Gaussian distribution with zero-mean and variance
.•••••
2
variance
The performance of the MMSE type estimator depends highly on the quality of the estimation of d'g~(k) or simply u~(k). Preliminary estimation of the variance field is a prerequisite to the proposed smoothing process. For this estimation, assuming the correlation between the variance of the neighboring coefficients is high in the given data field G,(k), one can set ag~(k) ~ ag~(j) E N(k). Here N(k) is a square shaped lofor all cal neighborhood centered at G,(k). Variance of the noisy coefficients, 'ag~(k), can be estimated using a ML estimator [4) as cig~(k) =
.• +- Osl.e,' ··X··I1II.c,'
(1)
Here ci, 2 (k) are the estimated variance of the noise-free coefficients using the proposed method.
••. 11~.c,t
0.4
0.0
mated by a MMSE estimator given by
algorithm
In this work, we assume that image pixels are corrupted by additive white Gaussian noise (AWGN) with known variance u~. If u~ is unknown, it may be estimated by applying the median absolute deviation (MAD) method [1) in the highest subband of the wavelet coefficients. Let F,(k) represent the wavelet coefficients of the true image for a given scale s. The corresponding wavelet coefficients of the noisy image are given by G,(k) = F,(k) + N,(k), where N,(k) are the wavelet coefficients of the additive noise. Our proposed denoising algorithm operates in three steps. First, we perform a crude estimation of the variance ug~(k) for the noisy coefficients, using the maximum likelihood (ML) estimator [4) or the maximum a posteriori (MAP) estimator [5). In the second step, more accurate variance field ug~(k) for the noisy coefficients, is recalculated by our proposed ICWMF. Finally, the denoised wavelet coefficients, F, (k) are esti-
ag; = u,2 + Un 2, and M is the number of coefficients in N(k). If the average power level of the signal coefficients in each scale, with a prior marginal distribution ft!, (ci,2) = (1/ A,) exp( -a, 2 / A,), is A" then ag~(k) can be estimated using a MAP estimator [5) as
L
(3) ag~(k) = M4A, [-1 + 1 + A, ~2 jeN(Ic) G;(j)] For renovation of the preliminary estimated variance field we introduce a new smoot.hing process that is adapted to both inter and inner scale, exploiting the statistics of wavelet coefficients. It is evident from Fig. 1 that approximate wavelet coefficients of practical images mostly represent the signal coefficients. We can neglect the smoothing of the noisy coefficients in the scales where signal coefficients dominate, by defining a threshold in terms of A,. A subband having A, higher than the threshold value is assumed to have mostly signal coefficients with insignificant noise coefficients and vice versa. In the proposed method, we apply the modified median filter termed as the ICWMF to the noise domina.ted high bands. If the preliminary estima.te of the local variances using an existing estimator, e.g. ML or MAP, is ag~(k), then the re-estimated variance ug:(k) after passing through the proposed filter is given by if A, 2: Ath ag~(k). (4) if A, < Ath cig~(k) = { mediclU (Ug~(j» I
305
for all j E N(k), where medi cw represents the center weighted median value of the given set of data for the i-th iteration. The parameter A. can be calculated from the standard deviation of the crude estimate of the signal coefficients' variances, rf.2 in each scale [5]. We define the threshold parameter Ath as the weighted average of A.. Assuming that the inter scale statistical average signal level decreases as a near exponential distribution following A. = C2·, with C being a suitable constant, the Ath can be calculated as At" = (f A.2·ds) / (f2·ds). In the high bands along with noise, signal component exists. Therefore, to remove noise from these bands with less pos~ible distortion of the signal components, the proposed ICWMF first identify the signal or noise dominant regions within the scale using.coefficientenergy as discriminatingfactor, and performs smoothing in a prescribed way. Magnitude of a wavelet coefficientand therefore its energy is a distinctive indicator of the image features. For a noisy image, it is expected that the magnitude of the wavelet coefficientswill be increased on average due to the addition of noise. That means that the low energy coefficients corresponding to the smooth regions in an image are dominated by the noise. We expect that, in this region smoothing of the preliminary estimated variance field by a straight median filter can produce better estimate of its noise-free value. On the contrary, high energy coefficients which corresponds to the regions of sharp transition in an image, are dominated by the signal. Using a straight median filter in this region would have adverse affect on the signal coefficients due to over smoothing. ITwe preserve the center value as it is in this region it ensures the correctness of the preliminary estimation. But our aim is to improve the performance in this region if possible. If we add a second term to the center value that is a weighted median of the differences of center to other values within the mask concerned, it is expected that the second term will simply smooth the gradient of the preliminary estimates. The possible outcomes are enhanced edge information and increased convergence of the smoothing process. To distinguish whether the variance is dominated by noise or by signal, we prescribe a scale independent threshold level which is a function of noise variance. Finally, our proposed adaptive median filter medicw can be defined as medicw (ug:(j))
= ug:(k) + medw (rf,:(j) - I1g:(k)), {med (rf,:(j)),
if 11,:(1c) 11,~(k) ~> 70'n2
(5)
The parameter 7 is a tuning factor that controls weight of the center value and the median value according to the mask size. The larger the mask size, the greater the
chance that median value can affect the center value . and hence the smaller the value of 7 should be. Since a straight median operator on the second term of the second condition in Eq. (5) represents nothing but the first condition, it necessitates that the second term be weighted. We chose the weight space B such that IBlw = IN(Ic) w(j)dj = 1. If the weighting function w(j) is the same as in [5],i.e. w(j) = exp (-iT~(j) / A.), then B can be defined as B(") 1
=
exp (-iT~(j)/A.) IN(Ic) exp (-iT~(j)/ '\.)dj
(6)
for all j e N(k). Finally, the weighted median operator medw can be obtained as medw (rfg:U)) = med (u,:(j)B(j)) (7) for all j.E N(k). Though the ICWMF results in a smoother version of the data set, it is a contrast invariant operator [7] and also it shows an asymptotic convergence. As over-smoothing·can affect the signal coefficients,the iterative smoothing process needs a terminating criterion that is a measure of smoothness of a data set. Here, we use "log-entropy" as an indicator of smoothness given by Hi(rfg:) = - 2:~';'lln [u,:(k)], with L. being the number of coefficientsin a given subband s. If IHi - Hi+lI/IHil is less than a very small value f, then the iteration is terminated. And the signal coefficients'variances can be estimated from O'g:(k) as
iT:(k)
= max
[O,ef,~(k) -
3. SIMULATION
O'n2]
(8)
RESULTS
Simulations have been performed on a number of images, but only results for Lena, and Mandrill are presented here due to the limitation of space. The image Lena is chosen here because it has a good mixture of smooth and details regions. The other image Mandrill is a representative of the image class that has large amount of oscillating pattern. The orthogonal wavelet Daubechies' of length-8 was used and decompositions were 5 levels deep. Centered square-shaped windows of sizes 3 x 3, 5 x 5 were applied to estimate the signal coefficientvariance, q~(k). The parameter 7 should be empirical, but we have observed that its suitable value lies in the range 1 to 4, and its value is dependent on the mask size. In our presented result, we have used 7 = 3 for the mask size 3 x 3, 2 for the mask size 5 x 5. The comparative results in terms of PSNR using the proposed and other recent methods are shown in Table 1. The first method is MATLAB's image denoising algorithm wiener2. The second method uses spatially adaptive wavelet thresholding (SAWT) method proposed in [6]. The third and fifth method show the result using locally adaptive windo
306
Table 1. Results in PSNR (dB) for different denoising methods Lena Mandrill
24.19 27.46 25.41 26.02 26.10 24.78 24.86 25.67 23.89 27.10 27.74 26.51 24.83 30.91 31.01 25.73 31.02 30.79 29.92 29.70 28.11 32.35 29.82 32.23 32.45 29.87 32.11 34.21 26.12 24.91 27.68 15 29.68 30.22 30.26 25 25.97 26.04 27.69 30.40 29.09 32.00 24.61 31.03 30.59 32.53 29.91 29.51 31.37 32.48 30.08 34.45 32.34 25.00 27.78 27.80 30.30 27.67 24.74 30.22 34.17 25.83 27.51 .24.41 29.59 33.77 34.33 34.50 30.81 26.18 30.30 30.25 34.10 34.45 34.42 29.01 30.08 Noise standard deviation 27.20 I 20 31.13 33.59 Denoising algorithms
Un
10
inter scale statistics of the image wavelet coefficients. An exponentially decaying inter scale model for image wavelet coefficients is used to classify the scales into' the signal and noise dominant ones. The ICWMF operates only on the noise dominant scales. For smoothing process within these scales, the proposed filter exploits inner scale statistics, where coefficient energy is chosen as an index for classification of signal and noise dominant regions. The simulation results have shown substantial improvement (0.20 - 1.0 dB) in the denoising performance by the proposed methods over some of the recent methods in terms of PSNR.
5. REFERENCES
denoising using MAP (LAWMAP) methods reported in [5]. Results using the proposed ICWMF are presented as the fourth and sixth methods, and they are categorized according to the two different preliminary estimates of the variance field. The method based on the ML method to compute the variance field will be termed as iterative center weighted median-based denoising using ML (ICWMML). And the other method, using the MAP estimator to compute the variance field will be termed as iterative center weighted median-based denoising using MAP (ICWMMAP). Simulations reveal that the arbitration of the terminating criterion f does not show any considerable degradation of the performance. The value of f was set to - 1.0 exp( -6) for the ICWMML method and - 1.0exp( -3) for the ICWMMAP method. It is evident from Table 1 that the proposed methods show better performance in terms of PSNR as compared to the other very often cited approaches in the literature for both the Lena, and Mandrill images.
4. CONCLUSION An effective wavelet domain iterative center weighted median filter (ICWMF) for image denoising has been proposed. The proposed filter operates on a preliminary estimate of the variance filed. For adaptation of the proposed filter, we have exploited both inner and
[1] D. L. Donoho, "Denoising by wavelet thresholding," IEEE nuns. Info. Theory, vol. 41, no. 3, pp. 613627,1995. [2] H. Zhang, A. Nosralinia, and R. O. Wells, Jr., "Image denoising via wavelet-domain spatially adaptive FIR wiener filtering," Proc. IEEE Int. Con/. Acoustics, Speech, and Signal Processing, Istambul, Turkey, vol. 5, pp. 2179-2182, 2000. [3] Z. Cai, T. H. Cheng, C. Lu, and K. R. Subramanium, "Efficient wavelet-based image denoising algorithm," Electron. Lett., vol. :~7,no. 11, pp. 683-685, 2001. [4] M. K. Mihcak, 1. Kozintsev, and K. Ramchandran, "Spatially adaptive statistical modeling of wavelet image coefficients and its application to denoising," Proc. IEEE Int. Conf. Acoustics, Speech, and Signal Processing, Phoenix, AZ, vol. 6, pp. 3253-3256, 1999. [5] M. K. Mihcak, I. Kozintsev, K. Ramchandran, and P. Moulin, "Low-complexity image denoising based on statistical modeling of wavelet coefficients," IEEE Signal Process. Lett., vol. 6, no. 12, pp. 300-303, 1999. [6] S. G. Chang, B. Yu, and M. Vettereli, "Spatially adaptive wavelet thresholding with context modeling for image denoising," IEEE nuns. Image Processing, vol. 9, no. 9, pp. 1522-1531, 2000. (7] F. Guichard, and J-M. Morel "Image iterative smoothing and PDE's," Lecture notes, School of mathematical problems in image processing, The Abdus Salam International Centre For Theoretical Physics, September, 2000.
301