0% found this document useful (0 votes)
2 views115 pages

Chapter 31

The document discusses image restoration techniques that aim to recover degraded images using prior knowledge of degradation phenomena, focusing on various noise models and filtering methods. It outlines the image degradation/restoration process, including spatial and frequency domain filtering, and details different types of noise such as Gaussian, Rayleigh, and impulse noise. Additionally, it covers adaptive filtering techniques and various filters like mean, median, and bandreject filters for effective noise reduction.

Uploaded by

23uelec006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views115 pages

Chapter 31

The document discusses image restoration techniques that aim to recover degraded images using prior knowledge of degradation phenomena, focusing on various noise models and filtering methods. It outlines the image degradation/restoration process, including spatial and frequency domain filtering, and details different types of noise such as Gaussian, Rayleigh, and impulse noise. Additionally, it covers adaptive filtering techniques and various filters like mean, median, and bandreject filters for effective noise reduction.

Uploaded by

23uelec006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 115

Restoration attempts to reconstruct or

recover an image that has been degraded by


using a priori knowledge of the degradation
phenomenon.
Outline
A Model of the Image Degradation/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
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
If H is a linear, position-invariant process,
then the degraded image is given in the
spatial domain by
g ( x, y ) h ( x , y ) * F ( x, y ) ( x, y )
Where h(x,y) is the spatial representation of
the degradation function.
Write the model in an equivalent frequency
domain representation.
G (u , v ) H (u , v ) F (u , v) N (u , v)
Outline
A Model of the Image Degradation/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
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
Spatial and Frequency Properties of Noise
Some Importany Noise Probability Density
Functions
Periodic Noise
Estimation of Noise Parameters
Parameters: define the spatial characteristics
of noise, and whether the noise is correlated
with the image.
Frequency properties: refer to the frequency
content of noise in the Fourier sense.
When the Fourier spectrum of noise is
constant, the noise usually is called white
noise.
Spatial and Frequency Properties of Noise
Some Importany Noise Probability Density
Functions
Periodic Noise
Estimation of Noise Parameters
Gaussian noise
The PDF of a Gaussian random variable, z, is
given by
1 (z )2 / 2 2
p( z ) e
2
z represents gray level,
is the mean of average value of z;
is its standard deviation.
Rayleigh noise
The PDF of Rayleigh noise is given by
2 ( z a )2 / b
(z a )e for z a
p( z ) b
0 for z a
The mean and variance of this density are
given by
a b/4
and
2 b(4 )
4
Erlang(Gamma) noise
The PDF of Erlang noise is given by
ab zb 1 az
e for z 0
p( z ) (b 1)!
0 for z 0

The mean and variance of this density are


given by
b
a
and
2 b
a2
Exponential noise
The PDF of exponential noise is given by
az
ae for z 0
p( z )
0 for z 0
The mean and variance of this density
function are
1
a
and
2 1
a2
Uniform noise
The PDF of uniform noise is given by
1
if a z b
p( z ) b a
0 otherwise
The mean of this density function is given by
a b
2
And its variance by
2 (b a ) 2
12
Impulse (salt-and-pepper)
noise
The PDF of (bipolar) impulse noise is given
by
Pa for z a
p( z ) Pb for z b
0 otherwise
Spatial and Frequency Properties of Noise
Some Importany Noise Probability Density
Functions
Periodic Noise
Estimation of Noise Parameters
Periodic noise in an image irises typically
from electrical or electromechanical
interference during image acquisition.

Periodic noise can be reduced significantly


via frequency domain filtering.
Spatial and Frequency Properties of Noise
Some Importany Noise Probability Density
Functions
Periodic Noise
Estimation of Noise Parameters
The parameters of periodic noise typically are
estimated by inspection of the Fourier
spectrum of the image.
The simplest way to use the data from the
image strips is for calculating the mean and
variance of the gray levels.
Consider a strip (subimage) denoted by S.
We can use the following sample
approximations from basic statistics:
z i p ( zi )
zi S
and
2
( zi u ) 2 p( zi )
zi S

where the zi’s are the gray-level values of the


pixels in S, and p(zi) are the corresponding
normalized histogram values.
Outline
A Model of the Image Degradation/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
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
When the only degradation present in an
image is noise

g ( x, y ) f ( x, y ) ( x, y )

and

G (u , v ) F (u , v ) N (u , v )
Mean Filters

Order-Statistics Filters

Adaptive Filters
Arithmetic mean filter
Let Sxy represent the set of coordinates in a
rectangular subimage window of size m*n,
centered at point (x,y).
The arithmetic mean filtering process computes
the average value of the corrupted image g(x,y)
in the area defined by Sxy.
The value of the restored image f at any point
(x,y) is simply the arithmetic mean computed
using the pixels in the region defined by Sxy. In
other words,
1
f ( x, y ) g ( s, t )
mn ( s ,t ) S xy
Geometric mean filter
An image restored using a geometric mean
filter is given by the expression
1
mn
f ( x, y ) g ( s, t )
( s ,t ) S xy
Harmonic mean filter
The harmonic mean filtering operation is
given by the expression
mn
f ( x, y )
1
( s ,t ) S xy g ( s, t )
Contraharmonic mean filter
The contraharmonic mean filtering operation
yields a restored image based on the
expression:
g ( s, t ) Q 1

( s ,t ) S xy
f ( x, y )
g ( s, t ) Q
( s ,t ) S xy

where Q is called the order of the filter.


Mean Filters

Order-Statistics Filters

Adaptive Filters
Median filter
Replaces the value of a pixel by the median
of the gray levels in the neighborhood of that
pixel:
f ( x, y ) median g ( s, t )
( s ,t ) S xy
Max and min filters
Using the 100th percentile results in the so-
called max filter, given by
f ( x, y ) max g ( s, t )
( s ,t ) S xy

The 0th percentile filter is the min filter:

f ( x, y ) min g ( s, t )
( s ,t ) S xy
Midpoint filter
The midpoint filter simply computes the
midpoint between the maximum and
minimum values in the area encompassed by
the filter:
1
f ( x, y ) max g ( s, t ) min g ( s, t )
2 s ,t ) S xy
( ( s ,t ) S xy
Alpha-trimmed mean filter
Suppose that we delete the d/2 lowest and the d/2
highest gray-level values of g(s,t) in the neighborhood
Sxy.Let gr(s,t) represent the remaining mn-d pixels. A
filter formed by averaging these remaining pixels is
called an alpha-trimmed mean filter:
1
f ( x, y ) g r ( s, t )
mn d ( s ,t ) S xy

Where the value of d can range from 0 to mn-1.


When d=0, the alpha-trimmed filter reduces to the
arithmetic mean filter.
If we choose d=mn-1, the filter becomes a median filter.
Mean Filters

Order-Statistics Filters

Adaptive Filters
Two simple adaptive filters whose behavior
changes based on statistical characteristics
of the image inside the filter region defined by
the m*n rectangular window Sxy.
Adaptive, local noise reduction
filter
The response of the filter at any point(x,y) on
which the region is centered is to be based
on four quantities:
g(x,y), the value of the noisy image at (x,y);
2
, the variance of the noise corrupting f(x,y) to
form g(x,y);
mL , the local mean of the pixels in Sxy;
2
L
, the local variance of the pixels in Sxy.
We want the behavior of the filter to be as follows:
2
If is zero, the filter should return simply the value of g(x,
y) This is the trivial, zero-noise case in wnich g(x, v is
equal to f(x, y)
If the local variance is high relative to 2 , the filter should
return a value close to g(x,y) A nigh local variance
typically is associated with edges, and these should be
preserved.
If the two variances are equal, we want the filter to return
the arithmetic mean value of the pixels in Sxy· This
condition occurs when the local area has the same
properties as the overall image, and local noise is to be
reduced simply by averaging.
An adaptive expression for obtaining f ( x, y )
based on these assumptions may be written
as
2

f ( x, y ) g ( x, y ) 2
g ( x, y ) m L
L
Outline
A Model of the Image Degradation/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
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
Bandreject Filters

Bandpass Filters

Notch Filters

Optimum Notch Filtering


Bandreject filters remove or attenuate a band of
frequencies about the origin of the Fourier
transform. An ideal bandreject filter is given by
the expression
W
1 if D(u , v) D0
2
W W
H ( u , v) 0 if D 0 D ( u , v) D0
2 2
W
1 if D(u , v) D0
2
Where D(u,v) is the distance from the origin of
the centered frequency rectangle, W is the width
of the band, and D0 is its radial center.
A Butterworth bandreject filter of order n is
given by the expression:
1
H ( u , v) 2n
D( u , v ) W
1
D 2 (u , v) D 02
And a Gaussian bandreject filter is given by
1 D 2 ( u ,v ) D02
2 D ( u ,v )W
H ( u , v) 1 e
Bandreject Filters

Bandpass Filters

Notch Filters

Optimum Notch Filtering


The transfer function Hbp(u,v) of a bandpass
filter obtained from a corresponding
bandreject filter with transfer function Hbr(u,v)
by using the equation
Hbp(u,v)=1-Hbr(u,v)
Bandreject Filters

Bandpass Filters

Notch Filters

Optimum Notch Filtering


The transfer function of an ideal notch reject
filter of radius D0, with centers at(u0,v0) and,
by symmetry, at(-u0,-v0), is
0 if D(u , v) D 0 or D 2 (u , v) D0
H ( u , v)
1 otherwise

where
2 2 1/ 2
D1 (u , v) u M / 2 u0 v N / 2 v0
and
2 2 1/ 2
D 2 ( u , v) u M / 2 u0 v N / 2 v0
The transfer function of a Butterworth notch
reject filter of order n is given by
1
H ( u , v) n
D 02
1
D1 ( u , v ) D 2 ( u , v )

A Gaussian notch reject filter has the form


1 D1 ( u , v ) D 2 ( u ,v )
2 D02
H ( u , v) 1 e
Bandreject Filters

Bandpass Filters

Notch Filters

Optimum Notch Filtering


The Fourier transform of the interference
noise pattern is given by the expression
N(u, v) H(u, v)G(u, v)
The corresponding pattern in the spatial
domain is obtained from the expression
1
( x , y) H ( u , v)G ( u , v)

f(x, y) g(x, y) - w(x, y) (x, y


The local variance of f(x, y)at coordinates (x,y)
can be estimated from the samples as follows:
a b 2
2 1
( x , y) f ( x s, y t ) f ( x, y )
(2a 1)(2b 1) s a t b
Where f ( x, y ) is the average value of f in the
neighborhood
a b
1
f ( x, y ) f ( x s, y t )
( 2a 1)(2b 1) s a t b
a b
2 1
( x , y) {[ g ( x s, y t ) w( x, y ) ( x s, y t )]
(2a 1)(2b 1) s a t b
w( x, y ) ( x s, y t )] [ g ( x, y ) w( x, y ) ( x, y )]}2

To minimize 2
( x, y ) ,we solve
2
( x, y )
0
w( x, y )
for w(x,y). The result is
g ( x, y ) ( x, y ) g ( x, y ) ( x, y )
w( x, y ) 2 2
( x, y ) ( x, y )
Outline
A Model of the Image Degradation/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
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
The input-output relationship is expressed as
g ( x, y ) H f ( x, y ) ( x, y )

( x, y ) 0

H is linear if

H af1 ( x, y ) bf 2 ( x, y ) aH f1 ( x, y ) bH f 2 ( x, y )
An operator having the input-output
relationship g ( x, y) H f ( x, y) is said to be
position invariant if
H f ( x a, y b) g ( x a , y b)

f ( x, y ) f ( , ) (x ,y )d d
g ( x, y ) f ( , )h( x, , y, )d d

Where h( x, , y, ) H ( x ,y )
If H is position invariant
H (x ,y ) h( x ,y )
then,

g ( x, y ) f ( , ) h( x ,y )d d

This expression is called the convolution integral.


Outline
A Model of the Image Degradation/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
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
Estimation by Image Observation

Estimation by Experimentation

Estimation by Modeling
G s (u, v)
H s (u, v)
Fs (u, v)

g s ( x, y ) :The observed subimage;


f s ( x, y ) :The constructed subimage;
Estimation by Image Observation

Estimation by Experimentation

Estimation by Modeling
G (u , v )
H (u , v )
A
G(u,v): The Fourier transform of the observed
image;
A: a constant describing the strength of the
impulse;
Estimation by Image Observation

Estimation by Experimentation

Estimation by Modeling
A degradation model proposed by Hufnagel
and Stanley is based on the physical
characteristics of atmospheric turbulence.
This model has a familiar form:
k ( u 2 v 2 )5 / 6
H (u, v) e
Suppose that an image components of
motion in the x- and y-directions, respectively.
If T is the duration of the exposure, it follows
that T
g ( x, y ) f x x0 (t ), y y 0 (t ) dt
0
T
j2 ux0 ( t ) vy0 ( t )
G (u, v) F (u, v) e dt
0
T
j2 ux0 ( t ) vy0 ( t )
H (u, v) e dt
0

G (u , v ) H (u , v ) F (u , v )
At a rate given by x 0 (t ) at / T , y 0 (t ) 0.

T j ua
H (u , v) sin( ua )e
ua

With the motion given by y 0 (t ) bt / T , then the


degradation function becomes
T j ( ua vb )
H (u, v) sin (ua vb) e
(ua vb)
Outline
A Model of the Image Degradation/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
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
G (u , v)
F (u , v)
H (u , v)

G (u , v ) H (u , v ) F (u , v) N (u , v )

N (u , v)
F (u , v ) F (u , v )
H (u , v )
Outline
A Model of the Image Degradation/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
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
2 2
e E f f

Based on these conditions, the minimum of


the error function is given in the frequency
domain by the expression
H * (u, v) S f (u , v)
F (u, v) 2
G (u , v)
S f (u , v) H (u, v) S (u, v)

H * (u , v)
2
G (u, v)
H (u, v) S (u, v) / S f (u, v)
2
1 H (u, v)
G (u, v)
H (u, v) H (u , v) 2 S (u, v) / S f (u , v)
Outline
A Model of the Image Degradation/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
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
The Wiener filter presents an additional
difficulty:
The power spectra of the undergraded image
and noise must be known.
g Hf
To find the minimum of a criterion function, C,
defined as M 1N 1
2 2
C f ( x, y )
x 0 y 0

Subject to the constraint


2 2
g Hf
The frequency domain solution to this
optimization problem is given by the
expression
H * (u , v)
F (u , v) 2 2
G (u, v)
H (u, v) P(u, v)

P(u,v) is the Fourier transform of the function


0 1 0
p ( x, y ) 1 4 1
0 1 0
Define a “residual” vector r as
r g Hf
2
( ) rT r r

2 2
r a
In order to use this algorithm, we need the
quantities r 2 and 2.
R (u , v) G (u, v) H (u , v) F (u, v)
M 1N 1
2
r r 2 ( x, y )
x 0 y 0
M 1N 1
2 1 2
( x, y ) m
MN x 0 y 0

M 1N 1
1
m ( x, y )
MN x 0 y 0

2 2
MN m2
Outline
A Model of the Image Degradation/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
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
1

H * (u , v ) H * (u , v )
F (u , v ) 2
H (u , v ) 2 S (u , v)
H (u , v )
S f (u , v)
Outline
A Model of the Image Degradation/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
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
A spatial transformation: which defines the
“rearrangement” of pixels on the image plane;

Gray-level interpolation: which deals with the


assignment of gray levels to pixels in the
spatially transformed image.
Spatial Transformations

x ' r ( x, y )
y ' s ( x, y )
r ( x, y ) c1 x c 2 y c3 xy c 4
s ( x, y ) c5 x c6 y c7 xy c8

and

x' c1 x c 2 y c3 xy c 4
y ' c5 x c6 y c7 xy c8
Gray-Level Interpolation

You might also like