Professional Documents
Culture Documents
Dip08 Restoration
Dip08 Restoration
Dip08 Restoration
g ( x, y ) h ( x, y ) f ( x, y ) n ( x, y )
G(u , v ) H (u, v) F (u , v) N (u , v)
Note: even small amounts of noise can lead
to large errors in restoration dip08_0.m
Note:
noise with
mean>0
was used
in these
images
- black+
pepper
- gray 1
- gray 2
- salt
17/11/2020
We are looking for the best compromise between noise attenuation and
Noise estimation from a locally uniform area of the image detail preservation.
Let Sxy be an mxn neighborhood of (x,y); define various mean filters:
Arithmetic mean 1
fˆ ( x, y ) g ( s, t )
mn ( s ,t )Sxy
1
Geometric mean mn
[Contraharmonic mean] fˆ ( x, y ) g ( s, t )
( s ,t )Sxy
Q 1
g ( s, t )
( s ,t )Sxy
Q
NonlinearFilters.m
c d e f
a a
b b
17/11/2020
2
fˆ ( x, y ) g ( x, y ) [ g ( x , y ) mL ]
n
2
L
Define:
Algorithm:
window size = minsize:
while (window size < maxsize) do
if (md=mi or md=ma) increase window size;
end do;
if (mi<g(x,y)<ma) output g(x,y), else output md;
• k = 0, W = 0: b’ = (a+b+c+d+e) / 5
0.2
Let D(u,v) be the distance from the origin of a given frequency. D(u , v) W 2 n
Band-reject filters (reject center frequency D0, reject bandwidth W):
Butterworth H (u, v) 1 1 2
2
D (u, v) D0
1 if D(u,v) D0 W / 2 and Gaussian
Ideal 1 D 2 (u, v) D 2 2
H (u , v) 0 if D0 W / 2 D(u,v) D0 W / 2 band-reject filters: H (u, v) 1 exp 0
1 2 D(u , v) W
if D(u,v) D0 W / 2
17/11/2020
Notch filters
Let
D1 (u, v) (u M / 2 u0 ) 2 (v N / 2 v0 ) 2
D2 (u, v ) (u M / 2 u0 ) 2 (v N / 2 v0 ) 2
distances of center-shifted freq. (u,v) from freqs. (u0 ,v0) and (-u0 ,-v0)
0 if D1(u,v) D0 or D2(u,v) D0
Ideal H (u, v)
1 otherwise
D02
n
Note: for the
Butterworth H (u , v) 1 1 filter coeff.
D1 (u, v) D2 (u, v) to be real,
notch areas
1 D (u , v) D (u , v) must always
Gaussian H (u , v) 1 exp 1 2
be defined in
2 D02 symmetric
pairs
17/11/2020
2. atmospheric turbulence:
(similar to a Gaussian) H (u, v) exp[k (u 2 v 2 )5 / 6 ]
x (t ) at T ; y (t ) 0
Note: H should be space-
variant to take into T T
H (u , v) exp[ j 2 u at T ] dt sin( ua) exp[ j ua]
account the different 0 ua
distances of the objects
h
s
W ( x s ) rgg ( s y ) rfg ( x y )
5.25-b
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing