Wiener Filter

63,921 views 22 slides Nov 08, 2012
Slide 1
Slide 1 of 22
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22

About This Presentation

A description of the wiener filter


Slide Content

WIENER&FILTER*

INTRODUCTION*
• The Wiener filter was proposed by Norbert Wiener in
1940.
• It was published in 1949
• Its purpose is to reduce the amount of a noise in a
signal.
• This is done by comparing the received signal with a
estimation of a desired noiseless signal.
• Wiener filter is not an adaptive filter as it assumes
input to be stationery.

DESCRIPTION*
• It takes a statistical approach to solve its goal
• Goal of the filter is to remove the noise from a signal
• Before implementation of the filter it is assumed that
the user knows the spectral properties of the original
signal and noise.
• Spectral properties like the power functions for both
the original signal and noise.
• And the resultant signal required is as close to the
original signal

DESCRIPTION*
• Signal and noise are both linear stochastic
processes with known spectral properties.
• The aim of the process is to have minimum mean-
square error
• That is, the difference between the original signal
and the new signal should be as less as possible.

Important&Equations*
• Considering we need to design a wiener filter in
frequency domain as W(u,v)
• Restored image will be given as;

Xn(u,v) = W(u,v).Y(u,v)


• Where Y(u,v) is the received signal and Xn(u,v) is the
restored image

Important&Equations*
• We choose W(k,l) to minimize:



Obtained from [1]
• Where the equation represents the mean square
error.
• The wiener filter can be represented by the
equation:

ACS-7205-001 Digital Image Processing (Fall Term, 2011-12) Page

289
5.8 Minimum Mean Square Error (Wiener) Filtering

Here we discuss an approach that incorporates both the degradation
function and statistical characteristics of noise into the restoration
process.

Considering images and noise as random variables, the objective
is to find an estimate
ˆ
f of the uncorrupted image f such that the
mean square error between them is minimized.

The error measure is given by

{ }
22 ˆ
()eEff=− (5.8-1)

where {}Ei is the expected value of the argument.

By assuming that

1. the noise and the image are uncorrelated;

2. one or the other has zero mean;

3. the intensity levels in the estimate are a linear function of
the levels in the degraded image.

Then, the minimum of the error function in (5.8-1) is given in the
frequency domain by the expression

2
(,) (,)
ˆ
(,) (,)
(,) (,) (,)
f
f
HuvSuv
Fuv Guv
SuvHuv Suv
η
∗
=

+

2
(,)
(,)
(,) (,)/ (,)
f
Huv
Guv
Huv S uv S uv
η
∗
=

+
(5.8-2)
2
2
(,)1
(,)
(,)(,) (,)/ (,)
f
Huv
Guv
HuvHuv S uv S uv
η

=

+

Important&Equations*

• Obtained from [1]

Important&Equations*
• H(u,v) = degradation function
• |H(u,v)|^2 = H*(u,v)H(u,v)
• H*(u,v) = complex conjugate of H(u,v)
• Sn(u,v) = |N(u,v)|^2 power spectrum of noise
• Sf(u,v) = |F(u,v)|^2 power spectrum of
undegraded image
. G(u,v) is the transform of the degraded image.

Important&Equations*
• The signal to noise ration can be approximated
using the following equation:






Obtained from [1]
• Low noise gives high SNR and High noise gives Low
SNR. The value is a good metric used in
characterizing the performance of restoration
algorithm
ACS-7205-001 Digital Image Processing (Fall Term, 2011-12) Page

290
The terms in (5.8-2) are as follows:

ˆ
(,) Fuvis the frequency domain estimate

(,) Guvis the transform of the degraded image

(,)Huv is the transform of the degradation function

(,)Huv

is complex conjugate of (,)Huv

2
(,) (,) (,)Huv H uvHuv

=

2
(,) (,)Suv Nuv
η == power spectrum of the noise

2
(,) (,)
fSuv Fuv== power spectrum of the undegraded image

This result is known as the Wiener filter, which also is commonly
referred to as the minimum mean square error filter or the least
square error filter.

The Wiener filter does not have the same problem as the inverse
filter with zeros in the degradation function, unless the entire
denominator is zero for the same value(s) of u and v.

If the noise is zero, then the Wiener filter reduces to the inverse
filter.

One of the most important measures is the signal-to-noise ratio,
approximated using frequency domain quantities such as

11
2
00
11
2
00
(,)
(,)
MN
uv
MN
uv
Fuv
SNR
Nuv
−−
==
−−
==
=
∑∑
∑∑
(5.8-3)

Important&Equations*
• The MSE in statistical form can be calculated as:




Obtained from [1]
• If restored signal is considered as signal and
difference between the restored and degraded as
the noise, then we can obtain SNR in spatial domain



Obtained from [1]

ACS-7205-001 Digital Image Processing (Fall Term, 2011-12) Page

291
The mean square error given in statistical form in (5.8-1) can be
approximated also in terms a summation involving the original
and restored images:

11
2
00
1
ˆ
(,) (,)
MN
xy
MSE f x y f x y
MN
−−
==
=−
∑∑ (5.8-4)

If one considers the restored image to be signal and the difference
between this image and the original to be noise, we can define a
signal-to-noise ratio in the spatial domain as

11
2
00
11
2
00
ˆ
(,)
ˆ
(,) (,)
MN
xy
MN
xy
fxy
SNR
fxy fxy
−−
==
−−
==
=
 −

∑∑
∑∑
(5.8-5)

The closer f and
ˆ
f are, the larger this ratio will be.

If we are dealing with white noise, the spectrum
2
(,)Nuv is a
constant, which simplifies things considerably. However,
2
(,)Fuv is usually unknown.

An approach is used frequently when these quantities are not
known or cannot be estimated:

2
2
(,)1
ˆ
(,) (,)
(,)(,)
Huv
Fuv Guv
HuvHuv K

=

+
(5.8-6)

where K is a specified constant that is added to all terms of
2
(,)Huv .

Note: White noise is a random signal (or process) with a flat power spectral
density. In other words, the signal contains equal power within a fixed
bandwidth at any center frequency.
ACS-7205-001 Digital Image Processing (Fall Term, 2011-12) Page

291
The mean square error given in statistical form in (5.8-1) can be
approximated also in terms a summation involving the original
and restored images:

11
2
00
1
ˆ
(,) (,)
MN
xy
MSE f x y f x y
MN
−−
==
=−
∑∑ (5.8-4)

If one considers the restored image to be signal and the difference
between this image and the original to be noise, we can define a
signal-to-noise ratio in the spatial domain as

11
2
00
11
2
00
ˆ
(,)
ˆ
(,) (,)
MN
xy
MN
xy
fxy
SNR
fxy fxy
−−
==
−−
==
=
 −

∑∑
∑∑
(5.8-5)

The closer f and
ˆ
f are, the larger this ratio will be.

If we are dealing with white noise, the spectrum
2
(,)Nuv is a
constant, which simplifies things considerably. However,
2
(,)Fuv is usually unknown.

An approach is used frequently when these quantities are not
known or cannot be estimated:

2
2
(,)1
ˆ
(,) (,)
(,)(,)
Huv
Fuv Guv
HuvHuv K

=

+
(5.8-6)

where K is a specified constant that is added to all terms of
2
(,)Huv .

Note: White noise is a random signal (or process) with a flat power spectral
density. In other words, the signal contains equal power within a fixed
bandwidth at any center frequency.

Important&Equations*
• But it is sometimes hard to estimate the power
spectrum of either the un-degraded image or the
noise.
• In that case we assume a constant K, that is then
added to all terms of H|(u,v)|^2
• The new equation in that case becomes:




Obtained from [1]
ACS-7205-001 Digital Image Processing (Fall Term, 2011-12) Page

291
The mean square error given in statistical form in (5.8-1) can be
approximated also in terms a summation involving the original
and restored images:

11
2
00
1
ˆ
(,) (,)
MN
xy
MSE f x y f x y
MN
−−
==
=−
∑∑ (5.8-4)

If one considers the restored image to be signal and the difference
between this image and the original to be noise, we can define a
signal-to-noise ratio in the spatial domain as

11
2
00
11
2
00
ˆ
(,)
ˆ
(,) (,)
MN
xy
MN
xy
fxy
SNR
fxy fxy
−−
==
−−
==
=
 −

∑∑
∑∑
(5.8-5)

The closer f and
ˆ
f are, the larger this ratio will be.

If we are dealing with white noise, the spectrum
2
(,)Nuv is a
constant, which simplifies things considerably. However,
2
(,)Fuv is usually unknown.

An approach is used frequently when these quantities are not
known or cannot be estimated:

2
2
(,)1
ˆ
(,) (,)
(,)(,)
Huv
Fuv Guv
HuvHuv K

=

+
(5.8-6)

where K is a specified constant that is added to all terms of
2
(,)Huv .

Note: White noise is a random signal (or process) with a flat power spectral
density. In other words, the signal contains equal power within a fixed
bandwidth at any center frequency.

Working&Example&1*
• We apply the filter to the following set of images





1 obtained from [1] 2 Obtained from [1]
• We reduce the noise variance (noise power):





3 obtained from[1] 4 obtained from [1]
ACS-7205-001 Digital Image Processing (Fall Term, 2011-12) Page

293
Example 5.13: Further comparisons of Wiener filtering

















ACS-7205-001 Digital Image Processing (Fall Term, 2011-12) Page

293
Example 5.13: Further comparisons of Wiener filtering

















ACS-7205-001 Digital Image Processing (Fall Term, 2011-12) Page

293
Example 5.13: Further comparisons of Wiener filtering

















ACS-7205-001 Digital Image Processing (Fall Term, 2011-12) Page

293
Example 5.13: Further comparisons of Wiener filtering

Working&Example&1*
• We decrease the noise variance even further:





5 obtained from [1] 6 obtained from [1]
• As we can see A wiener filter does a very good job
at deblurring of an image and reducing the noise.
ACS-7205-001 Digital Image Processing (Fall Term, 2011-12) Page

293
Example 5.13: Further comparisons of Wiener filtering

















ACS-7205-001 Digital Image Processing (Fall Term, 2011-12) Page

293
Example 5.13: Further comparisons of Wiener filtering

Example&2*
• The problem is to estimate the power spectrum of
noise and even more difficult is to estimate the
power spectrum of the image.
• We know that most of the images have similar
power spectrum.
• We take two images and calculate their individual
power spectrum
• The images derived are obtained from [2]

Example&2*
Obtained from [2]

Example&2*
• We calculate the power spectrum of each image:

















Obtained from [2]

Example&2*
• If we restore the cameraman image using its own
power spectrum, the image will look like this:










Obtained from [2]

Example&2*
• But we use the power spectrum obtained from the
house image, the restored image will look like this:









Obtained from [2]

Example&2*
• Now if we consider a large set of images and
calculate the power spectrum for them and find a
mean, that could then be used as the power
spectrum input for the wiener filter, we are likely to
get better results.
• Hence, it is important to have a large data set, to
calculate power spectrum for.
• In the previous scenario a user can derive the noise
power spectrum from previous knowledge or can
calculate it by observing the variance within an
image’s smoother part.

How&to&use&Wiener&filter?*
• Implementation of wiener filter are available both in
Matlab and Python.
• These implementations can be used to perform
analysis on images.

Conclusion*
• Wiener filter is an excellent filter when it comes to
noise reduction or deblluring of images.
• A user can test the performance of a wiener filter
for different parameters to get the desired results.
• It is also used in steganography processes.
• It considers both the degradation function and
noise as part of analysis of an image.

References*
• [1] R. Gonzalez and W. RE, Digital Image
Processing, Third Edit. Pearson Prentice Hall, 2008,
pp. 352–357.
• [2] S. Eddins, “Matlab Central Steve on Image
Processing.” [Online]. Available: http://
blogs.mathworks.com/steve/2007/11/02/image-
deblurring-wiener-filter/. [Accessed: 25-Aug-2012].