Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 21

Digital Image Processing

Image Restoration:
Estimating the Degradation Function

Course Website: http://www.comp.dit.ie/bmacnamee


2
of
Linear, Position-Invariant Degradation
31

• Degradation Model

g ( x, y )  H [ f ( x, y )]   ( x, y )

In the absence of additive noise:


For scalar values of a and b, H is linear if:
H [a f1 ( x, y )  b f 2 ( x, y )]  a H [ f1 ( x, y )]  b H [ f 2 ( x, y )]
H is Position-Invariant if:
g ( x, y )  H [ f ( x, y )]  H [ f ( x   , y   )]  g ( x   , y   )
3
of
Linear, Position-Invariant
31
Degradation
In the presence of additive noise:
 
g ( x, y )    f ( ,  )h( x   , y   )d d   ( x, y)
  

g ( x, y )  h ( x, y ) * f ( x, y )   ( x, y )
G (u , v)  H (u , v) F (u , v)  N (u , v)

• Many types of degradation can be approximated by


linear, position-invariant processes
• Extensive tools of linear system theory are available
• In this situation, restoration is image deconvolution
4
of
31
Estimating the Degradation Function

• There are three principal ways to estimate the


degradation function for use in image restoration:

 Observation
 Experimentation
 Mathematical modeling
5
of
31
Estimating by Image Observation
• We look for a small section of the image that has strong
signal content ( g s ( x, y ) ) and then construct an un-
degradation of this section by using sample gray levels
( fˆs ( x, y ) ).
Gs (u , v)
H s (u , v) 
Fˆs (u , v)

Now, we construct a function H (u , v) on a large scale,


but having the same shape.
6
of
31
Estimating by Experimentation

• We try to obtain impulse response of the degradation by


imaging an impulse (small dot of light) using the system.
Therefore
G (u , v)
H (u , v) 
A
7
of
31
Estimating by Modeling
 k ( u 2  v 2 )5 / 6
• Atmospheric turbulence model: H (u , v)  e

High
turbulence
Negligible k=0.0025
turbulence

Mid Low
turbulence turbulence
k=0.001 k=0.00025
8
of
31
Estimating by Modeling

Blurring by linear motion:


T
g ( x, y )   f [ x  x0 (t ), y  y0 (t )]dt
0
T
G (u , v)  F (u , v)  e  j 2 [ux0 (t )  vy0 (t )]dt
0
T
 H (u , v)   e  j 2 [ux0 (t )  vy0 (t )]dt
0 T

if x0 (t )  at / T and y0 (t )  0  H (u, v)   e 2uat / T dt


0

T
 sin( ua )e  j ua
 ua
9
of
31
Estimating by Modeling

if x0 (t )  at / T and y0 (t )  bt / T 
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

T
H (u, v)  sin[ (ua  vb)]e  j ( ua  vb )
 (ua  vb)

H.R. Pourreza
10
of
31
Inverse Filtering
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

The simplest approach to restoration is direct inverse


filtering:
ˆ G (u , v) Even if we know the
F (u , v)  degradation function, we
H (u , v)
cannot recover the un-
N (u , v) degraded image
Fˆ (u , v)  F (u, v) 
H (u, v)

If the degradation has zero or very small values, then the ratio
N/H could easily dominate our estimation of F .

One approach to get around the zero or small-value problem is to


limit the filter frequencies to value near the origin.
11
of
31 Inverse Filtering Degraded
Image
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Filtering with H
cut off outside a
radius of 40
Full inverse
Filtering

Filtering with H cut


off outside a radius
of 70

Filtering with H
cut off outside a
H.R. Pourreza
radius of 85
12
of
Minimum Mean Square Error
31
Filtering (Wiener Filtering)
This approach incorporate both the degradation
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

function and statistical characteristic of noise into the


restoration process.

e 2  E[( f  fˆ ) 2 ]

The objective is to find an estimation for f such that minimized e2

It is assumed that the noise and image are


uncorrelated; that one or the other has zero mean; and
that the intensity levels in the estimate are a linear
function of the levels in the degraded image.
13
of
Minimum Mean Square Error
31
Filtering (Wiener Filtering)
 H *
(u , v ) S (u , v ) 
Fˆ (u, v)  
f
2
G (u , v)
 S f (u, v) H (u, v)  S (u, v) 
 H * (u, v)  If the noise is zero,
 2
G (u, v) then the Wiener Filter
 H (u , v)  S (u , v) / S f (u , v)  reduces to the inverse
filter.
 1 H (u, v)
2

 2
G (u, v)
 H (u, v) H (u, v)  S (u, v) / S f (u , v) 

2
S (u , v)  N (u , v)  power spectrum of the noise
2
S f (u , v)  F (u , v)  power spectrum of the undegraded image
14
of
Minimum Mean Square Error
31
Filtering (Wiener Filtering)
 1 H (u , v )
2

Fˆ (u, v)   2
G (u, v)
 H (u, v) H (u, v)  S (u, v) / S f (u , v) 

Constant Unknown

 1 H ( u , v )
2

Fˆ (u , v)   2
G (u, v)
 H (u, v) H (u , v)  K 
15
of
31
Wiener Filtering

Radially limited Wiener filtering


Full inverse
filtering inverse filtering (K was chosen interactively)
16
of
31
Wiener Filtering Inverse filtering Wiener filtering

Reduced
noise
variance
17
of
31
Constrained Least Squares Filtering

Beside knowing the degradation function H, the Wiener filter presents


Additional difficulty: Power spectra of the undegraded image and noise
must be known.
Although the following equation produced good results, a constant estimate of
the power spectra is not always suitable.
 1 H ( u , v )
2

Fˆ (u , v)   2
G (u , v)
 H (u , v) H (u , v)  K 

The method we discuss here requires knowledge of only the mean and variance
of the noise.
18
of
31
Constrained Least Squares Filtering
MNx1
If we use vector-matrix form
Note that H matrix is
g  Hf  η high-dimensional!

MNxMN
MNx1
Method
M 1 N 1 2
min C    [ 2 f ( x, y )]
x 0 y 0
~
subject to constraint || g  H f ||2 || η ||2
The frequency domain solution is given as

 0 1 0 
~  *
H (u , v)   
F (u , v)   2 
G (u , v) p ( x, y )   1 4  1
 | H (u , v) |  | P (u , v) | 
2
 0  1 0 
19
of
31
Constrained Least Squares Filtering
It is possible to adjust the parameter  interactively until acceptable results
are achieved.
Define a residual vector r as
~
r  g  Hf
|| r ||2 || η ||2  a Eq. 1

(1) Specify an initial value of 


(2) Compute ||r||
(3) Stop if Eq. 1 is satisfied; otherwise return to step (2) after increasing  if
|| r ||2 || η ||2  a  || r ||2 || η ||2  a
or decreasing if . Use the new value of
To recompute the optimum estimate F(u,v).
|| η ||2  MN [ 2  m2 ]
It can be shown that

variance of noise mean of noise


20
of
31
Geometric Mean Filter
If we slightly change the classical formulation of Wiener filter we obtain

1
 H (u , v) 
*

 *
H (u , v) 
Fˆ (u , v)   2 
 2
 G (u , v)
 | H (u , v ) |   H (u , v)   [ S (u , v) / S f (u , v)] 

with  and  being positive, real constants .


When \alfa = 1 this filter reduces to the inverse filter. With \alfa = 0 the filter
beomes parametric Wiener filter and reduces to classical Wiener filter when \
beta=1.
If \alfa=1/2, the filter becomes a product of the two quantities raised to to the
same power, which is the definition of the geometric mean, thus giving the filter its
name.
21
of
31
Image Restoration Measures
• The mean square error

 
2
1 M 1 N 1
MSE    f ( x, y )  fˆ ( x, y )
MN x 0 y 0
• Signal to Noise Ratio
M 1 N 1
  fˆ ( x, y )
x 0 y 0
SNR 

M 1 N 1
ˆ
  f ( x, y )  f ( x, y )
x 0 y 0
2

You might also like