Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

Chapter 5: Image Restoration

5.1 Introduction
5.2 Noise Model
5.3 Restoration in the Presence of Noise – Spatial Noise Filters
5.4 Periodic Noise Reduction – Frequency Domain Filters
5.5 Linear, Position-Invariant Degradation
5.6 Estimating the Degradation Function
5.7 Inverse Filtering
5.8 Minimum Mean Square Error – Wiener Filter
5.9 Constrained Least Square Filters
5.10 Geometric Mean Filter
5.11 Geometric Transformations
5.1 Introduction

An image is usually degraded by noise, vibration and electro-mechanical


interactions, hence it needs restoration by various means.

In theory, if g(x, y) is noise free, restoration can be done by using the


inverse transfer function of H(u, v) as the restoration filter.
5.2 Types of Noise (Noise Model)
z Gaussian noise
The probability density function (normalized histogram) p(z) is given by

z: grey level
µ: mean value
σ2: standard deviation
Histogram and p(z)
of noise – triple
Gaussian noises

The original image is designed to measure noise. The noise probability


density p(z) can be measured by
Noise = noisy image – original image
Then the model parameters µ and σ2 can be evaluated from the histogram.

z Rayleigh noise
The histogram shows there are
three peak of Rayleigh type noise,
hence the noise model can
assumed as
3
2 − ( z − ak )2 / bk
p ( z ) = ∑ ( z − ak )e
k =1 bk
z Gamma noise (Erlang noise)
z Exponential noise
z Uniform noise
z Impulse (salt-and-pepper) noise

bipolar noise has two impulse peak


z Periodic noise

The image shows spatially periodic


noises, corresponds to sine waves of
various frequency

The DFT of the original image shows


four conjugate pair of peaks indicating
the frequencies of the periodic noise in
the original image.
All types of the above noises are position independent except the periodic
noise.

z Estimation of noise parameters


Given the probability density function measured from the histogram of
noise using the standard test pattern shown above, first the most-likely noise
model is chosen (be it Gaussian, Rayleigh, Gamma or exponential) before
the noise parameters are estimated.
For instance, if the noise appear to be Gaussian, the parameters can be
obtained by two steps:
5.3 Restoration against Position Independent Noise– Spatial Noise Filters

This section discusses various noise filters for image restoration when the
degradation function H(u, v)=1 and the noises are position independent. That is,
noise is the only source for degradation of the image.

z Mean filters
A mean filter uses a convolution mask of the size mxn to result in one
pixel in the output image.
In the above, (x, y) is the location of the output pixel
and (s, t) is the location of a pixel in the mask.
◆ Arithmetic mean filter find the arithmetic average, while the other find
the geometric average. Averaging causes blurring (low-pass filtering).
(a) Original X-ray
image
(b) Gaussian noise

(c) Result of
arithmetic mean
filter - blurring
(d) Result of
geometric mean
filter - blurring
z Harmonic mean filter

Again the output pixel is obtained by using a mask


It works well for Gaussian noise and salt
noise (white dots on the image), but fails
with pepper noise (black dots)

z Contra-harmonic mean filter


(a) Image with
pepper noise
(b) Image with salt
noise

(c) Filtered by
contra-harmonic
mean filter Q=1.5
(d) Filtered by
contra-harmonic
filter Q= -1.5
◆ Result of using wrong parameters in contra-harmonic mean filter

Filtering Filtering salt


pepper noise noise with
with Q= -1.5 Q= +1.5
z Order-statistic filters
Median filter is a typical order-statistic filter that determines the output pixel
according to the order of pixel brightness in a mask.

z Median filter for bipolar and unipolar impulse noise


z Max filters

To filter out pepper noise (black dots)

z Min filters
To filter out salt noise (white dots)

z Midpoint filters

Use the sum of Max and Min filter to remove pepper and salt noises,
Gaussian noise and uniform noises
z Alpha-trimmed mean (ATM) filter for Gaussian + salt-and-pepper noise
This filter first remove the d/2 lowest and the d/2 highest grey level in the
mask and leave mn-d pixels denoted by gr(s, t), them average these pixels to
give the resultant output
Averaging causes blurring

ATM filter = Arithmetic


mean filter for d = 0

ATM filter = median


filter for d = (mn-1)/2
z Adaptive filters
Let g(x, y) be the noisy image, ση describes the global zero-mean noise
2

of the image, mL and σ L describes the local noise in the mask, then the
2

output grey level at (x, y) is given by

The global variance ση is usually unknown, but it is important to maintain


2

ση 2 < σ L 2 by some pretests.


An adaptive filter can remove Gaussian filter as effective as arithmetic and
geometric mean filter, but with a minor effect of blurring (low-pass filtering).
(a) Image with
Gaussian noise
(b) result of arithmetic
mean filter

(c) result of geometric


mean filter
(d) result of adaptive
filter with shaper
edges.
z Adaptive median filter

Consider a window Sxy and assume

The adaptive median filtering algorithm works in two level: level A and B
If zmin<zmed<zmax, then
A1>0 & A2<0, and zmed
cannot be impulse noise,
so GO to level B.
Otherwise zmed is impulse
and output the original zxy
If zmin<zxy<zmax, then
B1>0 & B2<0, and zxy
cannot be impulse noise,
so output zxy.
Otherwise zxy is impulse
and output the median zmed

Noisy image median filter adaptive median filter


Adaptive median filter gives sharper edges than median filter.
5.4 Periodic Noise Reduction – Frequency Domain Filters
z Band-reject filters
ideal band-reject filter

Butterworth band-reject filter and Gaussian band-reject filter


2
⎡ D 2 ( u ,v ) − D 2 ⎤
1 1
− ⎢⎢ 0 ⎥
H (u, v) = 2n 2 ⎢ D (u ,v )W ⎥⎥
⎡ D(u, v)W ⎤ H (u, v) = 1 − e ⎣ ⎦
1+ ⎢ 2 2⎥
⎣ D (u , v ) − D0 ⎦
Ideal band-reject Butterworth band-reject Gaussian band-reject

Image with periodic


noise and its Fourier
transform

rejected band of Butterworth band-

Butterworth filter reject filter and its


result
z Band-pass filters
A band-pass filter HBP(u, v) can be obtained from a band-reject filter HBR(u, v)

Image with periodic noise periodic noise obtained by


band-pass filter
z Notch filters
A notch filter rejects frequencies near prescribed frequency points ( u , v )

Ideal notch filter

Butterworth Gaussian
notch filter notch filter
Ideal notch filter

where
2 2 2 2
⎛ M⎞ ⎛ N⎞ ⎛ M⎞ ⎛ N⎞
D1 (u , v ) = ⎜ u − u0 − ⎟ + ⎜ v − v0 − ⎟ and D2 (u , v ) = ⎜ u + u0 − ⎟ + ⎜ v + v0 − ⎟
⎝ 2 ⎠ ⎝ 2⎠ ⎝ 2 ⎠ ⎝ 2⎠

Butterworth notch filter


1
H (u, v) = n
⎡ D0 2 ⎤
1+ ⎢ ⎥
⎣ 1
D (u , v ) D2 (u , v ) ⎦
Gaussian notch filter

1 ⎢ D1 (u ,v ) D2 (u ,v ) ⎤⎥
− ⎢ ⎥
2⎢ D2 ⎥
H (u, v) = 1 − e ⎣ 0 ⎦
The original image (a) has
horizontal scan lines (d),
which can be removed by
the band-like notch filter (c)
to result in (e)
z Optimum Notch Filter
The need of an optimum notch filter arises from the fact that clear noise
pattern in the Fourier transformed plane are not common.
Consider the image shown below from a spacecraft, the start like bright
spots in the Fourier transformed plane (on the right) are not all due to noises.

Original image f(x, y) Fourier transform F(u, v)


Instead, it is the combination of several types of noises. In such a case,
previous approaches fail.
Let η ( x, y ) be the noise pattern, N(u, v) be its Fourier transform, G(u, v) be
the Fourier transform of the noise corrupted image, and a filter H(u, v) is
designed to allow only the noise pattern to pass, that is
N (u, v) = H (u, v)G (u , v) (5.4.11)
Accordingly, the noise pattern η ( x, y ) can be reconstructed from

η ( x, y ) = F −1
{H (u, v)G (u, v)} (5.4.12)

However, in many cases, η ( x, y ) can not be reconstructed exactly. In such


a case, the image fˆ ( x, y ) is to be reconstructed from the weighted noise
fˆ ( x, y ) = g ( x, y ) − w( x, y )η ( x, y ) (5.4.13)
where w( x, y ) is a position dependent weighting function to minimize the local
variance of fˆ ( x, y ) , denoted as σ ( x, y ) , in an neighbor around (x, y) of the
2

size (2a+1)x(2b+1)
a b
1 ⎡ fˆ ( x + s, y + t ) − fˆ ( x, y ) ⎤
σ ( x, y ) 
2
∑ ∑
(2a + 1)(2b + 1) s =− a s =−b ⎢⎣ ⎥⎦ (5.4.14)
a b
1
fˆ ( x, y )  ∑ ∑
(2a + 1)(2b + 1) s =− a s =−b
fˆ ( x + s, y + t )

= the average value of fˆ ( s, t ) in the region


(5.4.15)
s ∈ [− a + x, a + x] and t ∈ [ −b + y, b + y ]
Following the derivations given in page 251 of the textbook, it can be shown
where g ( x, y )η ( x, y ) , g ( x, y ), η ( x, y ) , η ( x, y )
2

2
and η ( x, y ) are, respectively, the average
values of g ( x, y )η ( x, y ) , g ( x, y), η ( x, y) , η (x, y)
2

and η ( x , y ) • η ( x , y ) in the region


s ∈ [ − a + x, a + x ] and t ∈ [−b + y , b + y ] .

original image noise pattern optimum notch filter

You might also like