Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2
2/2553 J.PANYAVARAPORN@GMAIL.COM
3 4
Degradation/Restoration Process Noise Models
` If H is linear, position-invariant process, then ` Principal source of noise in digital image is due to:
g ( x, y ) = h ( x, y ) ∗ f ( x, y ) + η ( x, y ) ` Image acquisition (quantization)
G (u, v ) = H (u , v )F (u , v ) + N (u , v ) ` Transmission
` If we assume H is the identity operator, we deal only with ` Noise Models
degradation
g due to noise ` Spatially independent and uncorrelated
` Spatial processing is applicable when the only degradation is ` Spatially periodic noise
additive noise ` Spatially dependent and correlated noise (complex)
` Degradation such as image blur are approached in the
frequency domain, with filters based on various criteria of
optimality
ti lit
5 6
⎪ ( z − a )e b for z ≥ a
` Most common model of noise p(z ) = ⎨ b
` The PDF of the Gaussian random ⎪⎩ 0 for z < a
variable z is given by: μ = a + πb 4
b(4 − π )
p(z ) =
1
e −( z − μ ) / 2σ σ2 =
2 2
2π σ 4
z : gray level
l l ` The basic shape of the PDF is skewed to the right
μ : mean of z ` The Rayleigh density is useful for approximating skewed
σ : standard deviation histograms
σ 2: variance of z
7 8
Erlang Noise Exponential Noise
⎧ a b z b −1 − az
⎪ for z ≥ 0 ⎧ae − az for z ≤ 0
p( z ) = ⎨ (b − 1)! p(z ) = ⎨
e
⎪⎩ 0 for z < 0 ⎩ 0 for z > 0
where a and b are positive integers ` Where a > 0
b b
μ = ; σ2 = 1
μ = ;σ 2 =
1
a a2 a a2
` When the denominator is the gamma function Γ(b), its ` Special case of the Erlang PDF with b = 1
called the gamma density
9 10
⎧ 1
⎪
p(z ) = ⎨ b − a
if a ≤ z ≤ b ⎧ Pa for z = a
⎪
⎪⎩ 0 otherwise p(z ) = ⎨ Pb for z = b
⎪0 otherwise
a + b 2 (b − a )
2 ⎩
μ= ;σ =
2 12
11 12
Noise Models Noise Models
` Noise impulse can be negative ` Noise models provide useful tools to model a broad
or positive range of noise corruption
` Scaling is part of the digitizing ` Gaussian noise: electric circuit noise, sensor noise due to poor
process ill i i and
illumination d hi
highh temperature
` Rayleigh noise: characterizes noise phenomena in range imaging
` Impulse
p noise is usuallyy
` E
Exponential
ti l and
d Gamma
G noise:
i applications
li ti in
i laser
l imaging
i i
large compared with the
` Impulse noise: quick transients (such as faulty switching) take
image signal place during imaging
` Pure black (pepper) or white ` Uniform noise: basis for random number generation in
((salt)) is equal
q to the minimum simulations
and maximum allowed values
g
in the digitized image
g
13 14
Noise Histograms
g Noise Histogram
FFourier
i ttransform
f off a
pure sinusoid is a pair of
conjugate impulses
17 18
19 20
Estimation of Noise Parameters Noise Only Model
Noise-Only
` Simplest way to use the data from the image strip is for ` When the only degradation present in the image is noise
calculating the mean and variance of the gray levels
g ( x, y ) = f ( x, y ) + η ( x, y )
` If S is a strip (subimage)
μ = ∑ zi p ( zi ) G (u , v ) = F (u , v ) + N (u , v )
zi ∈S
` If η(x,y) is periodic
σ = ∑ ( zi − μ )2 p( zi )
2
` Estimate N(u,v)
( , ) from G(u,v)
( , )
zi ∈S
zi : the gray - level value of the pixels in S ` Subtract N(u,v) from G(u,v) to obtain an estimate of F(u,v)
p ( zi ) : the corresponding normalized histogram values ` If η(x,y) is not periodic
` The shape of the histogram identifies the closest PDF ` Spatial filtering is the preferred method of choice when the
match only additive noise is present.
` If the shape is gaussian then the mean and variance
completely
co p ete y specifies
spec es the
t e PDF of
o the
t e noise
o se
21 22
23 24
Geometric Mean Filter Harmonic Filter
` A geometric mean filter achieves smoothing comparable ` Works well for salt noise, but fails for pepper noise.
to the arithmetic mean filter, but it tends to lose less image ` Performs well also with other types of noise like Gaussian
detail in the process noise.
fˆ ( x, y ) =
1 mn
⎡ ⎤ mn
fˆ ( x, y ) = ⎢ ∑ g (s, t )⎥
1
⎢⎣( s ,t )∈S xy ⎥⎦
∑ g (s, t )
( )
s ,t ∈S xy
25 26
27 28
Examples Examples
(a) Pepper noise with
pprobabilityy of 0.1 ` The arithmetic and geometric mean filters are well suited
(b) Salt noise with probability for random noise like Gaussian or uniform noise.
of 0.1
(c) Filtering (a) using contra
contra- ` The contra-harmonic filter is well suited for impulse noise
harmonic filter (Q=1.5) ` Must be known whether the noise is light or dark to choose
(d) Filtering (b) using Q = -1.5 the proper sigh of Q
Positive order filter did a better ` Result of selecting the wrong Q
job of cleaning the
g
background, , at the expense
p
of blurring the dark areas.
The opposite effect is true
for negative-order contra-
harmonic filters
29 30
31 32
Midpoint Filter Alpha Trimmed Mean Filter
Alpha-Trimmed
` Computes the midpoint between the maximum and the ` Delete the d/2 lowest and d/2 highest gray-level values of g(s,t)
minimum values in the area in the neighborhood Sxy
` gr(s,t) represents the remaining (mn-d) pixels
fˆ ( x, y ) = ⎡⎢ max {g (s, t )}+ min {g (s, t )}⎤⎥
1 ` A filter formed by averaging these remaining pixels is called
2 ⎣( s ,t )∈S xy ( s ,t )∈S xy alpha-trimmed mean filter
⎦
fˆ ( x, y ) = ∑ g (s, t )
1
` This filter combines order statistics and averaging mn − d
r
( s ,t )∈S xy
` Works best for randomly distributed noise,
noise like Gaussian
noise or uniform noise. ` d can range from 0 to mn-1
` d=0 Æ arithmetic mean filter
` d ( 1) Æ median
d=(mn-1) d ffilter
l
` Other values of d Æ useful in situations with multiple kinds of noise,
i.e. combination of salt-and-pepper
p pp and Gaussian
33 34
Examples Examples
(a) Image corrupted by salt
and pepper noise
` (a) Applying the max filter to the pepper noise image
(b) One pass with the ` Also removed some dark pixels
median filter. (several ` (b) Applying the min filter to the salt noise image
noise points are still
visible) ` Did a better job than max filter
(c) Second pass with ` Removed some white points around the border of light objects
median filter
(d) Third pass
35 36
Examples
(a) Uniform noise (variance 800, zero
mean)
(b) Addition of salt-and-pepper noise
(Pa=Pb=0.1)
( ) Arithmetic mean filter (5x5)
(c)
(d) Geometric mean filter (5x5)
Q
Question
i ?
((e)) Median Filter ((5x5))
(f) Alpha-trimmed mean (5x5,d=5)
37