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

Image Restoration

JASPREET KAUR
Modified from restoration.ppt by Yu Hen Hu
What is Image Restoration
The purpose of image restoration is to restore a degraded/distorted
image to its original content and quality.
Distinctions to Image Enhancement
Image restoration assumes a degradation model that is known or can
be estimated.
Original content and quality Good looking
Modified from restoration.ppt by Yu Hen Hu
Image Degradation Model
Spatial variant degradation model

Spatial-invariant degradation model

Frequency domain representation
( , ) ( , , , ) ( , ) ( , ) g x y h x y m n f m n x y q = +

( , ) ( , ) ( , ) ( , ) g x y h x m y n f m n x y q = +

( , ) ( , ) ( , ) ( , ) G u v H u v F u v N u v = +
Modified from restoration.ppt by Yu Hen Hu
Noise Models
Most types of noise are
modeled as known
probability density functions
Noise model is decided
based on understanding of
the physics of the sources of
noise.
Gaussian: poor illumination
Rayleigh: range image
Gamma, exp: laser imaging
Impulse: faulty switch during
imaging,
Uniform is least used.
Parameters can be estimated
based on histogram on small
flat area of an image

Modified from restoration.ppt by Yu Hen Hu
Inverse Filter
Recall the degradation
model:

Given H(u,v), one may
directly estimate the original
image by



At (u,v) where H(u,v) ~ 0,
the noise N(u,v) term will be
amplified!
( , ) ( , ) ( , ) ( , ) G u v H u v F u v N u v = +

( , ) ( , ) / ( , )
( , )
( , )
( , )
F u v G u v H u v
N u v
F u v
H u v
=
= +
original, f
20 40 60
20
40
60
degraded: g
20 40 60
20
40
60
inverse filter
20 40 60
20
40
60
Invfildemo.m
Modified from restoration.ppt by Yu Hen Hu
Wiener Filtering (Least Mean Square Filtering)
Minimum mean-square error
filter
Assume f and q are both 2D
random sequences,
uncorrelated to each other.
Goal: to minimize
Solution: Frequency selective
scaling of inverse filter solution!



White noise, unknown S
f
(u,v):
{ }
2

E f f
2
2
( , )
( , )

( , )
( , )
( , ) ( , ) / ( , )
f
H u v
G u v
F u v
H u v
H u v S u v S u v
q
=
+
2
2
( , )
( , )

( , )
( , )
( , )
H u v
G u v
F u v
H u v
H u v K
=
+
original, f
20 40 60
20
40
60
degraded: g
20 40 60
20
40
60
Wiener filter, K=0.2
20 40 60
20
40
60
inverse filter
20 40 60
20
40
60
Modified from restoration.ppt by Yu Hen Hu
Derivation of Wiener Filters
Given the degraded
image g, the Wiener filter
is an optimal filter h
win

such that E{|| f h
win**
g||
2
}
is minimized.
Assume that f and q are
uncorrelated zero mean
stationary 2D random
sequences with known
power spectrum S
f
and
S
n
. Thus,
{ } { }
{ } { }
{ } { }
( )
2 2
2
*
2 2
* *
2 2
* *
( , ) ( , ) ( , )
( , ) ( , ) ( , ) ( , )
( , ) ( , ) ( , ) ( , ) ( , )
( , ) ( , ) ( , ) ( , ) ( , )
( , ) ( , ) ( , ) ( , ) (
win win
win
win win
f win f n
win f win
C E f h g E F u v H u v G u v
E F u v H u v E F u v G u v
H u v E F u v G u v H u v E G u v
S u v H u v H u v S u v S u v
H u v H u v S u v H u v H u
= =
=
+
= + +
, ) ( , )
f
v S u v
{ }
{ }
{ }
{ }
2
2
*
*
( , ) ( , )
( , ) ( , )
( , ) ( , )
( , ) ( , ) 0
f
n
E F u v S u v
E N u v S u v
E F u v N u v
E F u v N u v
=
=
= =
*
2
( , ) 0
( , ) ( , )
( , )
( , ) ( , ) ( , )
Set C/
win
f
win
f n
H u v
H u v S u v
H u v
H u v S u v S u v
c c =
=
+
**
Modified from restoration.ppt by Yu Hen Hu
Constrained Least Square (CLS) Filter
Minimize:
where is an operator that measures the
roughness (e.g. a second derivative operator)

Subject to constraint:


where

J q m n f m n : || ( , ) **

( , )|| =
2
q m n ( , )
|| ( , ) ( , ) **

( , )|| g m n h m n f m n s
2 2
c
c
2
0 >
Modified from restoration.ppt by Yu Hen Hu
Solution and Iterative Algorithm
To minimize C
CLS
, Set
cC
CLS
/ cF = 0. This yields


The value of however, has to
be determined iteratively! It
should be chosen such that
Iterative algorithm (Hunt)
1. Set initial value of ,
2. Find , and compute
R(u,v).
3. If ||R||
2
- ||N||
2
< - a, set =
B
L
, increase , else if
||R||
2
- ||N||
2
> a, set = B
u
,
decrease , else stop
iteration.
4.
new
= (B
u
+B
L
)/2, go to step 2.

2
2 2
( , ) ( , ) ( , )
( , ) ( , ) ( , )
CLS
C G u v H u v F u v
N u v Q u v F u v
=
+
*
2 2
( , )

( , ) ( , )
( , ) ( , )
H u v
F u v G u v
H u v Q u v
=
+
2
2
2 2

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

= <

( , ) F u v
Modified from restoration.ppt by Yu Hen Hu
CLS Demonstration
iteration 1, gamma=5.0005
20 40 60
20
40
60
iteration 4, gamma=0.62594
20 40 60
20
40
60
iteration 7, gamma=0.079117
20 40 60
20
40
60
iteration 10, gamma=0.010765
20 40 60
20
40
60
iteration 13, gamma=0.0022206
20 40 60
20
40
60
iteration 15, gamma=0.0028309
20 40 60
20
40
60

You might also like