Chapter 31
Chapter 31
g ( x, y ) f ( x, y ) ( x, y )
and
G (u , v ) F (u , v ) N (u , v )
Mean Filters
Order-Statistics Filters
Adaptive Filters
Arithmetic mean filter
Let Sxy represent the set of coordinates in a
rectangular subimage window of size m*n,
centered at point (x,y).
The arithmetic mean filtering process computes
the average value of the corrupted image g(x,y)
in the area defined by Sxy.
The value of the restored image f at any point
(x,y) is simply the arithmetic mean computed
using the pixels in the region defined by Sxy. In
other words,
1
f ( x, y ) g ( s, t )
mn ( s ,t ) S xy
Geometric mean filter
An image restored using a geometric mean
filter is given by the expression
1
mn
f ( x, y ) g ( s, t )
( s ,t ) S xy
Harmonic mean filter
The harmonic mean filtering operation is
given by the expression
mn
f ( x, y )
1
( s ,t ) S xy g ( s, t )
Contraharmonic mean filter
The contraharmonic mean filtering operation
yields a restored image based on the
expression:
g ( s, t ) Q 1
( s ,t ) S xy
f ( x, y )
g ( s, t ) Q
( s ,t ) S xy
Order-Statistics Filters
Adaptive Filters
Median filter
Replaces the value of a pixel by the median
of the gray levels in the neighborhood of that
pixel:
f ( x, y ) median g ( s, t )
( s ,t ) S xy
Max and min filters
Using the 100th percentile results in the so-
called max filter, given by
f ( x, y ) max g ( s, t )
( s ,t ) S xy
f ( x, y ) min g ( s, t )
( s ,t ) S xy
Midpoint filter
The midpoint filter simply computes the
midpoint between the maximum and
minimum values in the area encompassed by
the filter:
1
f ( x, y ) max g ( s, t ) min g ( s, t )
2 s ,t ) S xy
( ( s ,t ) S xy
Alpha-trimmed mean filter
Suppose that we delete the d/2 lowest and the d/2
highest gray-level values of g(s,t) in the neighborhood
Sxy.Let gr(s,t) represent the remaining mn-d pixels. A
filter formed by averaging these remaining pixels is
called an alpha-trimmed mean filter:
1
f ( x, y ) g r ( s, t )
mn d ( s ,t ) S xy
Order-Statistics Filters
Adaptive Filters
Two simple adaptive filters whose behavior
changes based on statistical characteristics
of the image inside the filter region defined by
the m*n rectangular window Sxy.
Adaptive, local noise reduction
filter
The response of the filter at any point(x,y) on
which the region is centered is to be based
on four quantities:
g(x,y), the value of the noisy image at (x,y);
2
, the variance of the noise corrupting f(x,y) to
form g(x,y);
mL , the local mean of the pixels in Sxy;
2
L
, the local variance of the pixels in Sxy.
We want the behavior of the filter to be as follows:
2
If is zero, the filter should return simply the value of g(x,
y) This is the trivial, zero-noise case in wnich g(x, v is
equal to f(x, y)
If the local variance is high relative to 2 , the filter should
return a value close to g(x,y) A nigh local variance
typically is associated with edges, and these should be
preserved.
If the two variances are equal, we want the filter to return
the arithmetic mean value of the pixels in Sxy· This
condition occurs when the local area has the same
properties as the overall image, and local noise is to be
reduced simply by averaging.
An adaptive expression for obtaining f ( x, y )
based on these assumptions may be written
as
2
f ( x, y ) g ( x, y ) 2
g ( x, y ) m L
L
Outline
A Model of the Image Degradation/Restoration Process
Noise Models
Restoration in the Presence of Noise Only-Spatial
Filtering
Periodic Noise Reduction by Frequency Domain Filtering
Linear, Position-Invariant Degradations
Estimating the Degradation Function
Inverse Filtering
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
Bandreject Filters
Bandpass Filters
Notch Filters
Bandpass Filters
Notch Filters
Bandpass Filters
Notch Filters
where
2 2 1/ 2
D1 (u , v) u M / 2 u0 v N / 2 v0
and
2 2 1/ 2
D 2 ( u , v) u M / 2 u0 v N / 2 v0
The transfer function of a Butterworth notch
reject filter of order n is given by
1
H ( u , v) n
D 02
1
D1 ( u , v ) D 2 ( u , v )
Bandpass Filters
Notch Filters
To minimize 2
( x, y ) ,we solve
2
( x, y )
0
w( x, y )
for w(x,y). The result is
g ( x, y ) ( x, y ) g ( x, y ) ( x, y )
w( x, y ) 2 2
( x, y ) ( x, y )
Outline
A Model of the Image Degradation/Restoration Process
Noise Models
Restoration in the Presence of Noise Only-Spatial
Filtering
Periodic Noise Reduction by Frequency Domain Filtering
Linear, Position-Invariant Degradations
Estimating the Degradation Function
Inverse Filtering
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
The input-output relationship is expressed as
g ( x, y ) H f ( x, y ) ( x, y )
( x, y ) 0
H is linear if
H af1 ( x, y ) bf 2 ( x, y ) aH f1 ( x, y ) bH f 2 ( x, y )
An operator having the input-output
relationship g ( x, y) H f ( x, y) is said to be
position invariant if
H f ( x a, y b) g ( x a , y b)
f ( x, y ) f ( , ) (x ,y )d d
g ( x, y ) f ( , )h( x, , y, )d d
Where h( x, , y, ) H ( x ,y )
If H is position invariant
H (x ,y ) h( x ,y )
then,
g ( x, y ) f ( , ) h( x ,y )d d
Estimation by Experimentation
Estimation by Modeling
G s (u, v)
H s (u, v)
Fs (u, v)
Estimation by Experimentation
Estimation by Modeling
G (u , v )
H (u , v )
A
G(u,v): The Fourier transform of the observed
image;
A: a constant describing the strength of the
impulse;
Estimation by Image Observation
Estimation by Experimentation
Estimation by Modeling
A degradation model proposed by Hufnagel
and Stanley is based on the physical
characteristics of atmospheric turbulence.
This model has a familiar form:
k ( u 2 v 2 )5 / 6
H (u, v) e
Suppose that an image components of
motion in the x- and y-directions, respectively.
If T is the duration of the exposure, it follows
that T
g ( x, y ) f x x0 (t ), y y 0 (t ) dt
0
T
j2 ux0 ( t ) vy0 ( t )
G (u, v) F (u, v) e dt
0
T
j2 ux0 ( t ) vy0 ( t )
H (u, v) e dt
0
G (u , v ) H (u , v ) F (u , v )
At a rate given by x 0 (t ) at / T , y 0 (t ) 0.
T j ua
H (u , v) sin( ua )e
ua
G (u , v ) H (u , v ) F (u , v) N (u , v )
N (u , v)
F (u , v ) F (u , v )
H (u , v )
Outline
A Model of the Image Degradation/Restoration Process
Noise Models
Restoration in the Presence of Noise Only-Spatial
Filtering
Periodic Noise Reduction by Frequency Domain Filtering
Linear, Position-Invariant Degradations
Estimating the Degradation Function
Inverse Filtering
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
2 2
e E f f
H * (u , v)
2
G (u, v)
H (u, v) S (u, v) / S f (u, v)
2
1 H (u, v)
G (u, v)
H (u, v) H (u , v) 2 S (u, v) / S f (u , v)
Outline
A Model of the Image Degradation/Restoration Process
Noise Models
Restoration in the Presence of Noise Only-Spatial
Filtering
Periodic Noise Reduction by Frequency Domain Filtering
Linear, Position-Invariant Degradations
Estimating the Degradation Function
Inverse Filtering
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
The Wiener filter presents an additional
difficulty:
The power spectra of the undergraded image
and noise must be known.
g Hf
To find the minimum of a criterion function, C,
defined as M 1N 1
2 2
C f ( x, y )
x 0 y 0
2 2
r a
In order to use this algorithm, we need the
quantities r 2 and 2.
R (u , v) G (u, v) H (u , v) F (u, v)
M 1N 1
2
r r 2 ( x, y )
x 0 y 0
M 1N 1
2 1 2
( x, y ) m
MN x 0 y 0
M 1N 1
1
m ( x, y )
MN x 0 y 0
2 2
MN m2
Outline
A Model of the Image Degradation/Restoration Process
Noise Models
Restoration in the Presence of Noise Only-Spatial
Filtering
Periodic Noise Reduction by Frequency Domain Filtering
Linear, Position-Invariant Degradations
Estimating the Degradation Function
Inverse Filtering
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
1
H * (u , v ) H * (u , v )
F (u , v ) 2
H (u , v ) 2 S (u , v)
H (u , v )
S f (u , v)
Outline
A Model of the Image Degradation/Restoration Process
Noise Models
Restoration in the Presence of Noise Only-Spatial
Filtering
Periodic Noise Reduction by Frequency Domain Filtering
Linear, Position-Invariant Degradations
Estimating the Degradation Function
Inverse Filtering
Minimun Mean Square Error(Wiener) Filtering
Constrained Least Squared Filtering
Geometric Mean Filter
Geometric Transformations
A spatial transformation: which defines the
“rearrangement” of pixels on the image plane;
x ' r ( x, y )
y ' s ( x, y )
r ( x, y ) c1 x c 2 y c3 xy c 4
s ( x, y ) c5 x c6 y c7 xy c8
and
x' c1 x c 2 y c3 xy c 4
y ' c5 x c6 y c7 xy c8
Gray-Level Interpolation