Sei sulla pagina 1di 18

Image Restoration Lecture 9 (page 1)

5.1 Model of Image Degradation/Restoration


Spatial domain
g(x, y) = h(x, y) f(x, y) + (x, y)
Frequency domain
G(u, v) = H(u, v) F(u, v) + N(u, v)
H(u, v): Degradation function
(x, y): Additive noise term
The objective is to nd an estimate

f(x, y) of the original
image f(x, y). The more we know about H and , the closer

f(x, y) will be to f(x, y).


Image Restoration Lecture 9 (page 2)
5.2 Noise Models
Sources of noise: image acquisition and/or transmission
5.2.1 Spatial and Frequency Properties of Noise
What is the spatial characteristics of the noise?
Is the noise correlated with the image?
What is the frequency content of the noise?
When the Fourier spectrum is constant: white noise
Assumptions: Noise independent of spatial coordinates
Noise uncorrelated with respect to image
5.2.2 Noise PDFs
Statistical behavior of grey-level values of noise component
Gaussian noise
Popular model: sometimes used when marginally applicable
p(z) =
1

2
e
(z)
2
/2
2
Image Restoration Lecture 9 (page 3)
Rayleigh noise
Useful for approximating skewed histograms
p(z) =
_

_
(2/b) (z a) e
(za)
2
/b
, z a
0, z < a
= a +
r
b/4;
2
=
b(4 )
4
Erlang/Gamma noise
p(z) =
_

_
a
b
z
b1
(b 1)!
e
az
, z 0
0, z < 0
; a > 0; b pos. integer
=
b
a
;
2
=
b
a
2
Exponential noise
Special case of Erlang with b = 1
p(z) =
_

_
a e
az
, z 0
0, z < 0
; a > 0
=
1
a
;
2
=
1
a
2
Image Restoration Lecture 9 (page 4)
Uniform noise
p(z) =
_

_
1
b a
, a < z < b
0, otherwise
=
a + b
2
;
2
=
(b a)
2
12
Impulse (salt-and-pepper) noise
Noise impulses can be positive or negative
Usually large with respect to image signal
digitized as black or white
p(z) =
_

_
P
a
, z = a
P
b
, z = b
0, otherwise
Image Restoration Lecture 9 (page 5)
Image Restoration Lecture 9 (page 6)
These PDFs usually model specic noise corruption situations
(p 226)
Example 5.1
Image Restoration Lecture 9 (page 7)
Close correspondence between histograms and PDFs
Corrupted images similar - histograms signicantly dierent
5.2.3 Periodic noise
This is the only space dependent noise we shall consider
Can be reduced by frequency domain ltering
Image Restoration Lecture 9 (page 8)
5.2.4 Estimation of noise parameters
Periodic noise
Inspect Fourier spectrum: spikes
Automated analysis possible when spikes are pronounced
PDFs
Imaging system available: capture uniform environment
Imaging system not available: consider small patches of con-
stant gray scale
Image Restoration Lecture 9 (page 9)
=
X
z
i
S
z
i
p(z
i
)

2
=
X
z
i
S
(z
i
)
2
p(z
i
)
Shape of histogram identies closest PDF match
5.3 Restoration in the Presence of Noise:
Only Spatial Filtering
g(x, y) = f(x, y) + (x, y)
G(u, v) = F(u, v) + N(u, v)
Image Restoration Lecture 9 (page 10)
Noise term unknown
When only additive noise present: usually spatial ltering
5.3.1 Mean Filters
Arithmetic mean lter

f(x, y) =
1
mn
X
(s,t)S
xy
g(s, t)
Noise reduced as result of blurring
Geometric mean lter

f(x, y) =
_

_
Y
(s,t)S
xy
g(s, t)
_

_
1
mn
Loose less detail than arithmetic mean lter
Harmonic mean lter

f(x, y) =
mn
X
(s,t)S
xy
1
g(s, t)
Image Restoration Lecture 9 (page 11)
Works well for salt - fails for pepper
Works well for other types of noise
Contraharmonic mean lter

f(x, y) =
X
(s,t)S
xy
g(s, t)
Q+1
X
(s,t)S
xy
g(s, t)
Q
Q: Order of lter
Well-suited for salt-and-pepper noise
Q positive: eliminates pepper noise
Q negative: eliminates salt noise
Image Restoration Lecture 9 (page 12)
Summary
Arithmetic and geometric mean lters: Gaussian, uniform
noise
Contraharmonic mean lter: impulse noise, but have to
choose proper sign
Image Restoration Lecture 9 (page 13)
5.3.2 Order-Statistics Filters
Median lter

f(x, y) = median
(s,t)S
xy
{g(s, t)}
Max and min lters

f(x, y) = max
(s,t)S
xy
{g(s, t)}

f(x, y) = min
(s,t)S
xy
{g(s, t)}
Midpoint lter

f(x, y) =
1
2
_

_
max
(s,t)S
xy
{g(s, t)} + min
(s,t)S
xy
{g(s, t)}
_

_
Alpha-trimmed mean lter

f(x, y) =
1
mn d
X
(s,t)S
xy
g
r
(s, t)
d = 0: arithmetic mean lter;
d = (mn 1)/2: median lter;
suitable for combination of dierent types of noise
Image Restoration Lecture 9 (page 14)
5.3.3 Adaptive Filters
Behavior changes according to statistical characteristics of
sub-image in lter region
Adaptive, local noise reduction lter
g(x, y) = f(x, y) + (x, y)
Parameters in local region S
xy
:
(a) g(x, y), that is g at (x, y)
(b)
2

, that is the global variance of (x, y)


(c) m
L
, that is the local mean of S
xy
(d)
2
L
, that is the local variance of S
xy

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

2

2
L
[ g(x, y) m
L
]
Image Restoration Lecture 9 (page 15)

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

2

2
L
[ g(x, y) m
L
]
(1) If
2

= 0 then

f(x, y) = g(x, y): zero noise
(2) If
2
L

2

then

f(x, y) g(x, y): edges preserved
(3) If
2
L

2

then

f(x, y) = m
L
: arithmetic mean
We only need to know/estimate
2

We assume that
2
L

2

When
2
L
<
2

, then let
2
L
=
2

: makes lter non-linear


Image Restoration Lecture 9 (page 16)
Adaptive median lter
Advantages
(1) The standard median lter does not perform well when P
a
or P
b
is greater than 0.2, while the adaptive median lter
can better handle these Ps
(2) The adaptive median lter preserves detail and smooth
non-impulsive noise, while the standard median lter does
not
Adaptive median lter changes size of S
xy
during operation
Notation
z
min
= minimum gray level value in S
xy
z
max
= maximum gray level value in S
xy
z
med
= median of gray levels in S
xy
z
xy
= gray level at coordinates (x, y)
S
max
= maximum allowed size of S
xy
Image Restoration Lecture 9 (page 17)
Algorithm
Level A: A1 = z
med
z
min
A2 = z
med
z
max
if A1 > 0 AND A2 < 0, go to level B
else increase the window size
if window size < S
max
, repeat level A
else output z
xy
Level B: B1 = z
xy
z
min
B2 = z
xy
z
max
if B1 > 0 AND B2 < 0, output z
xy
else output z
med
Purpose
(1) Remove impulse noise
(2) Smoothing of other noise
(3) Reduce distortion, like excessive thinning or thickening of
object boundaries
Image Restoration Lecture 9 (page 18)
Explanation
Level A: IF z
min
< z
med
< z
max
, then
z
med
is not an impulse
(1) go to level B to test if z
xy
is an impulse ...
ELSE
z
med
is an impulse
(1) the size of the window is increased and
(2) level A is repeated until ...
(a) z
med
is not an impulse and go to level B or
(b) S
max
reached: output is z
xy
()
Level B: IF z
min
< z
xy
< z
max
, then
z
xy
is not an impulse
(1) output is z
xy
(distortion reduced)
ELSE
either z
xy
= z
min
or z
xy
= z
max
(2) output is z
med
(standard median lter)
z
med
is not an impulse (from level A)
() No guarantee that this is not an impulse. The smaller P
a
and/or P
b
are, or the larger S
max
is, the less likely a premature
exit will be
Figure 5.14

Potrebbero piacerti anche