Ch05-Image Restoration
Ch05-Image Restoration
Ch05-Image Restoration
1
www.imageprocessingbook.com
Chapter 5
Image
Restoration
www.ImageProcessingPlace.com
w.csie.ntnu.edu.tw/~violet/IP93/Chapter05.ppt
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. 2
www.imageprocessingbook.com
Noise Models
Noise Models
Spatial & Frequency Properties of Noise
Noise Models
Adding Noise with Function imnoise
Noise Models
Some Important Noises
1. Gaussian noise
2. Rayleigh noise
3. Erlang (Gamma) noise
4. Exponential noise
5. Uniform noise
6. Impulse (salt-and-
pepper) noise
Noise Models
Noise PDFs
1. Gaussian Noise:
z 2
1
p( z ) e 2 2
p(z)
2
where z represents gray level, is
the mean of average value of z,
is its standard deviation.
This noise arises in an image due to
factors such as electronic circuit
noise and sensor noise due to
poor illumination or/and high
temperature. z
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. 9
www.imageprocessingbook.com
Noise Models
Noise PDFs
2. Rayleigh Noise:
2 ( z a )2
z a e b
for z a p(z)
p( z ) b
0 for z a
b( 4 )
a b / 4 , 2
4
a z
a b
2
Noise Models
Noise PDFs
a a
Find applications in laser imaging.
b 1 z
a
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. 11
www.imageprocessingbook.com
Noise Models
Noise PDFs
4. Exponential Noise:
p(z)
ae az
for z a
p( z ) a
0 for z a
1 1
, 2
2
a a
z
It is a special case of Erlang PDF, with b=1.
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. 12
www.imageprocessingbook.com
Noise Models
Noise PDFs
5. Uniform Noise:
1 p(z)
if a z b
p( z ) b 1
0 otherwise 1
ba
ab (b a ) 2
, 2
2 12
Least descriptive of practical
applications, however quite
useful as the basis for numerous
random number generators that
are used in simulations. a b z
Noise Models
Noise PDFs
Noise Models
Noise PDFs
Noise Models
Noise PDFs
Noise Models
Noise PDFs
Noise Models
Noise PDFs
Noise Models
Noise PDFs
>> N = 1; 7000
>> a = 0;
6000
>> b = 1;
>> r = a + b*randn(M, N); 5000
3000
2000
1000
0
-5 -4 -3 -2 -1 0 1 2 3 4 5
Noise Models
Noise PDFs
• Mean Filters
• Order Statistics Filters
• Adaptive Filters
mn
fˆ ( x, y ) g ( s, t )
( s ,t )S xy
• Achieves smoothness comparable to the arithmetic mean filter
• Tends to lose less image detail in the process.
• Works very well for random symmetric (Gaussian or uniform) noise
distributions
• Does not work for negative impulse noise (pepper noise)
fˆ ( x, y )
g ( s , t ) Q
fˆ ( x, y ) mediang ( s, t )
( s ,t )S xy
Exercise:
1. Knowing that an image is contaminated by Gaussian and/or salt-
and-pepper noise, recover it by using restoration filters
2. Write an M-function [1, 5.3.1]:
f = spfilt(g, type, m, n, parameter)
which can perform filtering in the
spatial domain with any of the filters
listed in Table 5.2
3. [2, 5.10-5.11]
Assignment:
With given image “bars.tif” apply the M-function spfilt.m
and solve questions:
[2, 5.1-5.9]
Deliverables: Hardcopy of
M-function code & all the results
L 2 L
• σ2η – the variance of the noise in the (entire) image (assumed to be σ2L)
• σ2L – the local variance (within filter neighborhood)
• mL – the local mean
References
1. Gonzalez R. C., Woods R. E., Eddins S. L., Digital Image
Processing Using Matlab, Pearson Education, 2006.
2. Gonzalez R. C., Woods R. E., Digital Image Processing,
Pearson Education, 2006.
3. http://www.imageprocessingplace.com/