IMAGE RESTORATION USING A HYBRID COMBINATION OF PARTICLE FILTERING AND WAVELET DENOISING

Yan , Mark Yeary, Victor DeBrunner, Joseph P. Havlicek, and Osama Alkhouli

School of Electrical and Computer Engineering University of Oklahoma, Norman, OK USA Corresponding Email: {yan.zhai-1, yeary, vdebrunn, joebob}@.edu

ABSTRACT propagates a set of weighted samples (or particles) to simulate the posterior distribution of a system’s trajectory in state space. Since In this paper we propose a novel image restoration method PF inherently supports nonlinear dynamics and non-Gaussian forc- that effectively combines a particle filter with wavelet shrinkage ing and measurement noises, we use it here to suppress the heavily to achieve robust performance against inhomogeneous noise mix- tailed components of the corrupting noise, whereas wavelet shrink- tures. Specifically, the particle filter acts to suppress outlier-rich age is applied in a subsequent step to attenuate the Gaussian noise components of the noise while, in a subsequent step, the wavelet components. domain shrinkage attenuates any remaining, less heavily tailed noise components. We present late breaking preliminary examples demonstrating excellent rejection of salt-and-pepper like Cauchy 2. PROPOSED METHOD: PF-DWT DENOISING noise mixed with additive white Gaussian noise (AWGN). Al- When image is corrupted by noise comprising both heavily though limited in scope, these preliminary results suggest that tailed and Gaussian components, we have observed that undesir- the combination of particle filters with more traditional restoration able blurring artifacts are often introduced if one attempts to sup- techniques is a powerful approach that can provide a new dimen- press both components simultaneously. Therefore, we introduce a sion of flexibility for addressing noise mixtures involving difficult two-stage hybrid denoising technique called PF-DWT. In the first nonlinear and non-Gaussian components. stage, a spatial PF is used to suppress the heavy tailed component of the noise. In the second stage, wavelet thresholding is applied 1. INTRODUCTION to attenuate the remaining “Gaussian-like” noise. The input of the second stage depends on the output of the first stage, thus realizing The objective of restoration is to recover an image that has been a synergistic hybrid approach that is robust and effective against a corrupted by distortion and noise. In general, the distortion could wide variety of inhomogeneous noise mixtures. be linear or nonlinear and the noise might be Gaussian, heav- ily tailed, or both [1]. Traditional approaches typically involve 2.1. General Form of The Particle Filter a tradeoff between a deconvolution process designed to combat the distortion and a denoising process. In this paper, we focus on In this section, we briefly review the general PF framework de- the denoising part of the problem and specifically consider noise scribed in [6] - [8]. Consider a nonlinear system modeled in state mixtures involving simultaneous heavily tailed and Gaussian com- space according to ponents. Although the median filter is ideal for rejecting impul- xt = f(xt−1) + vt−1, (1) sive noise, its performance has been shown to be suboptimal when Gaussian noise components are also present [2]. yt = h(xt) + nt, (2)

Shrinkage methods based on thresholding in the discrete where xt and yt denote the hidden states and the observations of wavelet domain have attracted significant attention in image de- the system at time t, respectively. Both f(·) and h(·) could be non- noising applications [3]- [5]. The basic idea is to decompose the linear functions. For image processing, the time index t is replaced noisy image using the discrete wavelet transform (DWT) and then by spatial indices i and j representing the row and column of a apply thresholding, where it is assumed that small coefficients in pixel, respectively. The process and observation noises, which are the high frequency (small spatial scale) subbands are associated assumed non-Gaussian, are given by vt and nt, respectively. The with noise and can be set to zero without substantially affecting goal of the PF is to simulate the posterior distribution p(x0:t|y1:t), the main visually important features of the image. which, according to Bayes’ theorem, is given by In this paper we consider the combination of particle filter- p(y1:t|x0:t) p(x0:t) ing (PF) with wavelet shrinkage as a new hybrid approach for p(x0:t|y1:t) = R . (3) dealing with difficult, inhomogeneous noise mixtures containing p(y1:t|x0:t) p(x0:t) dx0:t both Gaussian and heavily tailed components. The PF technique Applying SIS, the state vector posterior distribution is approxi- has emerged as a superior method for treating nonlinear and non- mated by Gaussian problems [6]- [8] and has been applied recently for im- XNs age and video processing [9]- [11]. Also known as sequential im- (i) (i) p(x0:t|y ) ≈ ω˜ δ(x0:t − x ) , (4) portance sampling (SIS), PF is a Monte Carlo (MC) method that 1:t t 0:t i=1

0-7803-9134-9/05/$20.00 ©2005 IEEE (i) where the normalized importance weight ω˜t is given by 2.2.2. The Spatial Particle Filter Algorithm (i) The first step in designing a particle filter is to choose a proposal (i) ωt ω˜t = P (5) distribution. While arbitrary in form, the proposal must be sup- Ns ω(j) j=1 t ported by the posterior distribution of the true system state and and where must be easy to sample. For PF-DWT we use a standard Kalman filter to provide the proposal distribution, since the image model is p(y |x(i))p(x(i)|x(i) ) a linear system with non-Gaussian noise. Although the estimates ω(i) = ω(i) t t t t−1 . t t−1 (i) (i) (6) delivered by the Kalman filter are not optimal in this case, they q(x |x , y ) t 0:t−1 1:t still provide the required support for the true posterior. The 2-D Equation (6) is the importance weight update equation. The par- Kalman filter formulation is given by (i) ticles (or samples) xt are drawn from the proposal distribution x¯(i, j) =Cxˆ(i, j − 1) + Eu(i, j) (10) q(x |x(i) , y ). In addition, p(y |x(i)) and p(x(i)|x(i) ) repre- t 0:t−1 0:t t t t t−1 ¯ T T sent the system’s likelihood and the state transition prior, respec- P (i, j) =CP (i, j − 1)C + DQD (11) T T −1 tively. The variable Ns denotes the number of particles. The pro- K(i, j) =P¯(i, j)H [HP¯(i, j)H + R] (12) posal distribution is an arbitrary distribution which needs to have xˆ(i, j) =x¯(i, j) + K(i, j)[y(i, j) − Hx¯(i, j)] (13) at least some support from the posterior distribution of the true state. In addition, it has been shown that the variance of the im- P (i, j) =[I − K(i, j)H]P¯(i, j) , (14) portance weights increases over time [6]. This implies that after a where R and Q denote the covariance of the process noise and few iterations, all but one weight will converge to zero. When this measurement noise, respectively. Finally, the spatial particle filter occurs, a resampling scheme is introduced to solve this degeneracy algorithm is illustrated in Fig. 1 and is also summarized below. problem. More specifically, in a resampling scheme, a new set of equally weighted particles are generated from the previous parti- cles with large weights, while the particles with small weight are 1. Sequential Importance Sampling (SIS) Step: replaced. In other words, resampling discards the particles with • At each iteration, calculate xˆ(i, j) and P (i, j) according small weights and focuses on the particles with more significant to (10)-(14). weights. • Sample from the proposal distribution:

2.2. Particle Filter For Image Processing (Spatial Case) x(i)(i, j) ∼ N (xˆ(i, j),P (i, j)) . To implement the PF, we employ a 2-D state space model similar to the ones used for Kalman filtering in [2, 12, 13]. • Evaluate the importance weights according to (6): calcu- late the transition prior, the likelihood and the proposal. 2.2.1. The Image Model • Normalize the importance weights using (5). We use the image model proposed in [13] since it is efficient in the 2. Resample and Update Step: sense of using only a small number of pixels: • Generate a new set of particles xi?(t) from x(i)(i, j), so that I(i, j) =h1I(i, j − 1) + h2I(i − 1, j) ³ ´ i? (j) (j) + h3I(i − 1, j − 1), (7) P r x (i, j) = x (i, j) =ω ˜ (i, j) .

th th where I(i, j) denotes the pixel at the i row and j column of the • The final estimate of x(i, j) is given by image. In (7), h1, h2, and h3 are image parameters which can be estimated by various methods including, e.g., least-squares. Next, Ns 1 X the following state space model is constructed: x(i, j) ≈ xi?(i, j) . Ns i=1 x(i, j) =Cx(i, j − 1) + Eu(i, j) + Dw(i, j), (8) y(i, j) =Hx(i, j) + v(i, j), (9) • Update the proposal with the resampled particles. where     I(i, j) h1 0 h2 h3 2.3. Wavelet Thresholding for PF-DWT  I(i, j − 1)   1 0 0 0  x = C =  I(i − 1, j + 1)   0 0 0 0  We begin by applying the DWT to decompose the data into sub- I(i − 1, j) 0 0 1 0 bands. A threshold is then applied for noise removal. In the DWT domain, small coefficients in the high frequency subband are as- · ¸T £ ¤T 1 0 0 0 sumed to arise primarily from noise. The idea is to “zero out” the E = 0 0 1 0 D = 0 0 1 0 high frequency subband coefficients that are less than a particular £ ¤ threshold. These coefficients are used in an inverse wavelet trans- H = 1 0 0 0 formation to reconstruct the data set. In this paper, we employ the The input term u(i, j) is introduced as the recent estimate of pixel universal threshold [3] [4] given as: I(i − 1, j + 1). The variables w and v denote the process noise p and the measurement noise, respectively. T = σ 2 loge Nd (15) (1) ω (t) Normalize (2) Particle 50 50 ω (t) Kalman Filter Generate Particles Weights Output Using(10) − (14) Using estimated & Mean and Variance Resample 100 100 Observations

(Ns) ω (t) 150 150 Calculate Particle Weights Using (6) Update 200 200

250 250 Fig. 1. Block Diagram of the Spatial Particle Filter 50 100 150 200 250 50 100 150 200 250 (a)The Original Image (b) The Noisy Image where Nd is the size of the data set. By definition, basic threshold- ing methods are hard thresholding: 50 50 ½ x if|x| > T ρ (x) = (16) 100 100 T 0 if|x| < T

and the soft thresholding: 150 150   x − T if x ≥ T 200 200 ρT (x) = x + T if x ≤ −T (17)  0 if |x| ≤ T. 250 250 50 100 150 200 250 50 100 150 200 250 Moreover, the universal thresholding method can be improved (c) Restored Image Using PF (e) PF with Translation by using the translation invariant technique given in [3]. The basic (ISNR= 3.1991 dB) Invariant Hard Thresholding idea of this method is to estimate the coefficients of all translations (ISNR= 6.7126 dB) and take the average after a reverse translation. The final estimate is given by this average. More specifically, the coefficients F˜p of all the translated data, denoted by Xp[n] = X[n − p], are Fig. 2. This figure shows: (a) the original image, (b) the noisy calculated. By definition, image, (c) the result obtained by only applying the particle filter, (d) the restored images obtained by the PF with the translation NX−1 invariant thresholding. p p F˜ = ρT (X [m])gm , (18) m=0 where ρT is a hard or soft thresholding function. Then, these co- uses Kalman filter state estimates as its proposal is utilized to sup- efficients are shifted back and the averages are evaluated, which press the heavy tailed noise. After the this stage, the remaining gives the final estimate as noise is “Gaussian-like” in character and is attenuated by wavelet thresholding. In the second stage, translation invariant soft/hard N−1 1 X thresholding is applied to the PF result to achieve further noise re- F˜[n] = F˜p[n + p] . (19) N moval. Two examples of images restored in this way are shown p=0 in Fig. 2 and 3. As indicated in Fig. 2(c), the PF removes most As indicated in [3], the translation invariant method produces a of the heavy-tailed noise. The remaining noise, which is observed better denoised image than universal thresholding. to have a “Gaussian-like” distribution, can be removed using the wavelet thresholding method. The denoised image obtained via PF and translation invariant hard thresholding is shown in Fig. 2(d). As a second example, the grayscale image “cameraman” is also 3. EXPERIMENTAL RESULTS used to test the performance of the proposed method. The original, noisy, and denoised images are show in Fig. 3(a)-(d), respectively. In this section, the standard 256 × 256 grayscale image “Lena” These results show that the restored images Fig. 2(d) and Fig. 3(c), is used to assess the performance of the proposed hybrid denois- (d) are of remarkable visual quality. In addition, as a quantitative ing algorithm. The noisy image is generated by adding Gaus- performance measure, the improved signal to noise ratio (ISNR) of sian noise with a variance of 200 and a Cauchy noise with pdf the proposed hybrid method are also shown in Fig. 2 and Fig. 3. f(x) = θ/π(x2 + θ2), where θ = 5. The original and noise corrupted images are shown in Fig. 2(a) and (b), respectively. To construct the image model (7), the parameters h1 = 0.815493, 4. CONCLUSIONS AND FUTURE WORK h2 = 0.489516, h3 = −0.308866 were employed. These values were estimated by using the least squares method [13]. Images transmitted over modern packet switched wireless chan- The two-stage PF-DWT hybrid denoising process is carefully nels often contain both Gaussian and heavy-tailed noise. In this pa- tailored to operate synergistically. In the first stage, a PF which per, a PF-DWT hybrid denoising method was proposed for restor- [5] M. Banham and A. Katsaggelos, “Spatially-adaptive wavelet- Based mutiscale image restoration,” IEEE Trans. Image Proc., 50 50 pp. 619-634, Apr, 1996. [6] M. Arulampalam, S. Maskell, N. Gordon and T. Clapp, “A 100 100 tutorial on particle filters for online nonlinear/non-Gaussian Bayesian tracking,” IEEE Trans. Signal Proc., pp. 174-188, 150 150 Feb, 2002. [7] A. Doucet, S. Godsill, and C. Andrieu,“On sequential Monte 200 200 Carlo sampling methods for Bayesian filtering,” Statist. Com- put., 10(3), pp. 197-208, 2000. 250 250 50 100 150 200 250 50 100 150 200 250 [8] P. Djuri´c, J. Kotecha, J. , Y. , T. Ghirmai, M. (a)The Original Image (b) The Noisy Image Bugallo, and J. Miguez, “Particle filtering,” IEEE Signal Proc. Magazine, pp.19-38, Sep, 2003. [9] S. Zhou, R. Chellappa, B. Moghaddam, “Visual tracking and 50 50 recognition using appearance-adaptive models in particle fil- ters”, IEEE Trans. Image Proc., pp. 1491 - 1506, Nov. 2004. 100 100 [10] E. Arnaud, E. Memin and B. Cernuschi-Frias, “Conditional Filters for Image Sequence-Based TrackingApplication to

150 150 Point Tracking”, IEEE Trans. Image Proc., pp. 63 - 79, Jan. 2005.

200 200 [11] M. de Bruijne and M. Nielsen, “Image segmentation by shape particle filtering”, IEEE Proc. ICPR pp. 722 - 725, Aug.

250 250 2004. 50 100 150 200 250 50 100 150 200 250 (c) PF with Translation (d) PF with Translation [12] D. Angwin and H. Kaufman, “Image restoration using a re- Invariant Hard Thresholding Invariant Soft Thresholding duced order model Kalman filter,” IEEE ICASSP, pp. 1000- ISNR= 5.4722 dB ISNR= 3.4959 dB 1003, Apr, 1988. [13] D. , M. Swamy, and E. Plotkin, “Image restoration using Fig. 3. As another example, this figure shows: (a) the original im- an hybrid approach based on DWT and SMKF,” IEEE Proc. age, (b) the noisy image, (c) and (d) the restored images obtained Int. Image Proc. Conf., 2001, pp. 249-252, Oct, 2001. by PF with translation invariant hard/soft thresholding. [14] S. , B. , and M. Vetterli, “Adaptive Wavelet Thresh- olding for Image Denoising and Compression,” IEEE Trans. Image Proc., pp. 1532-1546, Sep, 2000. ing an image contaminated by an inhomogeneous mixture of both types of noise. The simulation results presented here demonstrate that the proposed method can effectively recover the original im- ages and merits future study. Various techniques including the BayesShrink algorithm [14] have been proposed recently for cal- culating improved thresholds. Based on the observation that the wavelet coefficients in a subband can be approximated by a gen- eralized Gaussian distribution (GGD), the improved threshold is 2 2 given by Tˆ =σ ˆ /σˆX , where σˆ and σˆX are the estimated noise variance and standard deviation of the GGD wavelet coefficients, respectively. Important future work will include incorporating this technique into the PF-DWT approach in the near future.

5. REFERENCES

[1] M. Banham and A. Katsaggelos,“Digital image restoration,” IEEE Signal Proc. Mag., pp. 24-41, Mar, 1997. [2] D. Rao, E. Plotkin, and M. Swamy, “A hybrid filter for restora- tion of color images in the mixed noise environment,” IEEE ICASSP, pp. 3680-3683, May, 2002. [3] S. Mallat, A wavelet tour of signal processing 2nd Edition, Academic Press, 1999. [4] D. Donoho and I. Johnstone, “Ideal spatial adaptation via wavelet shringkage,” Biometrica, pp. 425-455, 1994.