Хэв танилтын үндэс (Introduction to
Pattern Recognition )
Лекц 4. Image Restoration and Reconstruction
МУИС – МКУТ Д-р. Дэд проф. Б.Сувдаа
Contents
This lecture will cover:
A Model of the Image Restoration process
Noise Models
Restoration in the Presence of Noise Only – Spatial Filtering
Periodic Noise Reduction by Frequency Domain Filtering
Linear, Position-Invariant Degradations
Estimating the Degradation Function
Inverse Filtering
Minimum Mean Square Error (Wiener) Filtering
Constrained Least Squares Filtering
Geometric Mean Filter
A Model of the Image
Degradation/Restoration Process
Restoration Process
We consider the restoration problem only from the point where a
degraded.
We want the estimate to be as close as possible to the original
input image.
When the Fourier transform of noise is constant, the noise usually
called white noise
Noise Model
The principal source of noise in digital images arise from image
acquisition and/or transmission.
Some Important Noise PDFs:
The PDF of a Gaussian random variable, z
Rayleigh
b2 ( z a)e ( z a ) for z a
2
/b
p( z )
0 for z a
The mean and variance are given
b( 4 )
a b / 4 and 2
4
Noise Model (cont’)
Some Important Noise PDFs:
Erlang (gamma)
a b z b 1 az b b
p( z ) (b 1)!
e for z 0 and 2
2
a a
0 for z 0
Exponential (special case of Erlang b=1)
ae az for z 0
p( z )
0 for z 0
The mean and variance are given
1 1
and a 2
2
a
Noise Model (cont’)
Some Important Noise PDFs:
Uniform 1
if a z b ab (b a) 2
p( z ) b a and
2
0 otherwise 2 12
Bipolar impulse (Salt and Pepper)
Pa for z a
p ( z ) Pb for z b
0 otherwise
If b>a, a light dot in the image,
conversely, a dark dot in the image
Noise Model (cont’)
Noise Model (cont’)
Noise Model (cont’)
Estimation of Noise Parameters
The parameters of periodic noise typically are estimated by
inspection of the Fourier spectrum of the image
To capture a set of images of “flat” environments
Restoration in the Presence of Noise Only –
Spatial Filtering
In this section, We discuss the noise-reduction capabilities of the
spatial filters.
1
Mean filters
Arithmetic (blur)
fˆ ( x, y)
mn ( s ,t )S
g ( s, t )
x,y
mn
Geometric (blur) fˆ ( x, y) g ( s, t )
( s ,t )S xy
Harmonic (well for salt noise, but fails for pepper noise)
mn
fˆ ( x, y )
1
( s ,t )S xy g ( s, t )
Restoration in the Presence of Noise Only –
Spatial Filtering (cont’)
Mean filters
Contraharmonic
The contraharmonic mean filter operation is given by the
expression
g ( s ,
( s ,t )S xy
t ) Q 1
fˆ ( x, y )
g ( s ,
( s ,t )S xy
t ) Q
Where Q is called the order of the filter. This filter is well suited
for reducing or virtually eliminating the effects of salt-and-pepper
noise. Q>0, it eliminates pepper, Q<0, it eliminates salt.
Restoration in the Presence of Noise Only –
Spatial Filtering (cont’)
Restoration in the Presence of Noise Only –
Spatial Filtering (cont’)
Restoration in the Presence of Noise Only –
Spatial Filtering (cont’)
In general
Arithmetic and geometric filters are well suited for random
noise like Gaussian or uniform noise.
The Contraharmonic filter is well suited for impulse noise, but
it has the disadvantage that it must be known whether the
noise is dark or light in order to select the proper sign for Q.
Restoration in the Presence of Noise Only –
Spatial Filtering (cont’)
Order-Statistic Filters
Median (effective in the presence of both bipolar and unipolar impulse
noise)
fˆ ( x, y) mediang ( s, t )
( s ,t )S xy
Max and min (useful for finding the brightest /darkest points)
fˆ ( x, y) max g ( s, t ) fˆ ( x, y) min g (s, t )
( s ,t )S xy ( s ,t )S xy
Midpoint (best for randomly distributed noise, like Gaussian or uniform)
1
f ( x, y ) max g ( s , t ) min g ( s , t )
2 ( s ,t )S xy ( s ,t )S xy
Alpha-trimmed mean (useful in combination of multiple noise )
1
fˆ ( x, y) g r ( s, t )
mn d ( s ,t )S xy
Restoration in the Presence of Noise Only –
Spatial Filtering (cont’)
Result of median filter (3 times)
Restoration in the Presence of Noise Only –
Spatial Filtering (cont’)
Result of max and min filters
Restoration in the Presence of Noise Only –
Spatial Filtering (cont’)
(a) Image corrupted by
additive uniform noise. (b)
image additionally corrupted
by additive salt-and-pepper
noise. Image in (b) filtered
with a 5x5: (c) arithmetic
mean filter; (d) geometric
mean filter; (e) median filter;
and (f) alpha-trimmed mean
filter with d=5.
Restoration in the Presence of Noise Only –
Spatial Filtering (cont’)
Adaptive Filters
Adaptive, local noise reduction filter
Restoration in the Presence of Noise Only –
Spatial Filtering (cont’)
Adaptive Filters
Adaptive mean filter
Periodic Noise Reduction by Frequency
Domain Filtering
Periodic noise can be analyzed and filtered quite
effectively using frequency domain technique.
The approach is to use a selective filter to isolate the
noise.
Bandreject Filters
Periodic Noise Reduction by Frequency
Domain Filtering (cont’)
Denoising using Badreject filter
Periodic Noise Reduction by Frequency
Domain Filtering (cont’)
Bandpass Filters
Periodic Noise Reduction by Frequency
Domain Filtering (cont’)
Notch Filters
Periodic Noise Reduction by Frequency
Domain Filtering (cont’)
Notch Filtering
Linear, Position – Invariant Degradations
The image corrupted by additive noise and by a degradation
function can be modeled as:
Assuming further that the noise term is zero:
The degradation function is linear when
where a and b are arbitrary scalars and f1(x,y), f2(x,y) are two
arbitrary input images
Linear, Position – Invariant Degradations
Observe that when a=b=1:
which is called the additive property: if H is a linear operator,
the response to a sum of two inputs is a sum of two responses.
which is called the homogeneity property: if H is a linear
operator, the response to a constant multiple of any input equal
to the response to that input multiplied by same constant.
Therefore, a linear operator H possesses both additive and
homogeneity.
Linear, Position – Invariant Degradations
An operator H is called position (space) invariant if
Provided that
For any α, β, and f(x,y).
Many types of degradations can be approximated by linear,
position-invariant processes. Since degradations are modeled as
results of convolution, the restoration seeks the filters
performing the reverse procedure. Such filters are frequently
called deconvolution filters.
Estimating the Degradation Function
Estimation the Degradation Function
Estimation by Image Observation
Estimation by Experimentation
Estimation by Modeling
The process of image restoration by use of the estimated
degradation function is sometimes called blind deconvolution.
Estimating the Degradation Function (cont’)
Estimating the Degradation Function (cont’)
Estimating the Degradation Function (cont’)
Image blurring due to motion
Inverse Filtering
Direct inverse filtering
We compute an estimate, of the transform of the original image
simply by dividing the transform of the degraded image, by the
degradation function:
Inverse Filtering
Direct inverse filtering
The direct inverse
filtering is not good
Minimum Mean Square Error (Weiner)
Filtering
The method is founded on considering images and noise as
random variables, and the objective is to find an estimate of the
uncorrupted image such that mean square error between them is
minimized.
Constrained Least Square Filtering
Another solution to the optimization problem (minimization of
the least square error) can be formed as
Here P(u,v) is a DFT of a properly zero-padded Laplacian
operator
and γ is a parameter that can be selected manually or
iteratively…
Constrained Least Square Filtering (cont’)
Constrained Least Square Filtering (cont’)
It is possible to further generalize the Wiener filter:
to form the geometric mean filter.
here α and β are positive real constants.
With α = 0, the filter becomes a parametric Wiener filter.
When α = 0.5 and β = 1, the filter is called a spectrum
equalization filter.
Any questions ?