# Wiener filter for Image noise reduction

I'm trying to get my head round the operation of the Wiener filter for the purpose of image noise reduction. In my case I'll have used another noise reduction filter first and will then use the result of this as an approximation of the noise characteristics for the Wiener filter.

Regarding information on the Wiener filter, I found the following Matlab code & description useful:

and a few other good links such as

http://blogs.mathworks.com/steve/2007/11/02/image-deblurring-wiener-filter/

So from a Matlab perspective I can see how to use the inbuilt Matlab function, but I'd like to gain a more fundamental understanding rather than just use the function call, yet at the same time I'd prefer to find something more digestible than the Wikipedia entry on Wiener filtering.

Anyone care to offer a brief explanation on Wiener filtering?

-
before an answer is given... you need to state what your background is. do you know random processes theory? Without knowing random processes theory giving a concrete explanation is almost impossible. –  Trevor Boyd Smith Sep 22 '11 at 14:53
Unless you are okay with a more hand waving explanation. –  Trevor Boyd Smith Sep 22 '11 at 14:53
Thanks for the response. Yes I'm comfortable enough with random process theory and my background is in image processing –  trican Sep 22 '11 at 17:00
well... if you have random processes background then it should be possible to give a good explanation. (now i need to find time to write a good explanation.) –  Trevor Boyd Smith Sep 22 '11 at 17:15
Thanks Trevor! much appreciated - even some good pointers to kick me in the right direction would be much appreciated. –  trican Sep 22 '11 at 18:13

What you are looking for is information on empirical Weiner filtering [1,2]. The BM3D folks use the Weiner filter to optimize the parameters of the first step of denoising, specifically to choose the threshold at which to eliminate small coefficients of the their 3D transform.

-

There is another Wikipedia entry on Wiener filtering more applicable to image processing.

To summarize (and convert to 2D), given a system: $$y(n,m) = h(n,m) * x(n,m) + v(n,m)$$ where $*$ denotes convolution and $x$ is the (unknown) true image $h$ is the impulse response of a linear, time-invariant filter $v$ is additive unknown noise independent of $x$, and $y$ is the observed image.

We want to find a deconvolution filter $g$ so that we can estimate $x$ as follows: $$\hat{x}(n,m) = g(n,m) * y(n,m)$$ where $\hat{x}$ is an estimate of $x$ that minimizes the mean square error.

In the frequency domain, the transfer function of $g$, $G$ is: $$G(\omega_1, \omega_2) = \frac{H^*(\omega_1, \omega_2)S(\omega_1, \omega_2)}{|H(\omega_1, \omega_2)|^2S(\omega_1, \omega_2) + N(\omega_1, \omega_2)}$$ where * $G$ is the Fourier transform of $g$ * $H$ is the Fourier transform of $h$ * $S$ is the mean power spectral density of the input $x$, and * $N$ is the mean power spectral density of the noise $v$.

The equation for $G$ can be re-written as: $$G(\omega_1, \omega_2) = \frac{1}{H(\omega_1, \omega_2)} \left[ \frac{|H(\omega_1, \omega_2)|^2}{H(\omega_1, \omega_2)|^2 + \frac{N(\omega_1, \omega_2)}{S(\omega_1, \omega_2)}} \right]$$ So the Wiener filter has the inverse filter for $H$, but also a frequency-dependent term that attenuates the gain based on the signal to noise ratio.

-
Many thanks for your thorough response. I'm not clear how can I use the previous stage of denoising within the above explanation? Overall I'll need to sit down and figure out how to take the above explanation and implement it. –  trican Sep 27 '11 at 10:03
@trican: I'm not sure what you mean by "previous stage"? There's really only one stage: $g * y$. The formulation of $y$ is just a mathematical model of how you arrive at the image you have, it involves no processing (except image acquisition), and may not be very close to the reality of how you get the image. –  Peter K. Sep 27 '11 at 11:37
Sorry if I wasn't clear, what I meant is that for leading image noise reduction algortihms such as SADCT or BM3D ( cs.tut.fi/~foi/GCF-BM3D). A first stage of noise reduction is carried out (via SADCT or block matching 3d filtering for those two mentioned algorithms) and the result of this is used as an approximation for the secondary stage which employs wiener filtering. I'm trying to get my head around the secondary wiener filtering stage, thus my original question. –  trican Sep 27 '11 at 22:17