Week 10
Week 10
Filtering
02/09/2025 1
Perspective Plots of Band-reject Filters
02/09/2025 2
02/09/2025 3
A Butterworth
bandreject filter of
order 4, with the
appropriate radius and
width to enclose
completely the noise
impulses
02/09/2025 4
Perspective Plots of Notch Filters
02/09/2025 5
Perspective Plots of Notch Filters
• Due to the symmetry of the Fourier transform, notch
filters must appear in symmetric pairs about the
origin in order to obtain meaningful results.
• The one exception to this rule is if the notch filter is
located at the origin, in which case it appears by itself.
• Although we show only one pair for illustrative
purposes, the number of pairs of notch filters that can
be implemented is arbitrary.
• The shape of the notch areas also can be arbitrary
(e.g., rectangular).
N (u, v) H NP (u, v)G (u, v)
( x, y ) 1 H NP (u, v)G (u, v)
02/09/2025 7
Several interference components are present, the methods
discussed in the preceding sections are not always
acceptable because they remove much image information
The components tend to have broad skirts that carry
information about the interference pattern and the skirts are
not always easily detectable.
02/09/2025 8
Optimum Notch Filtering
02/09/2025 9
Optimum Notch Filtering: Step 1
02/09/2025 10
Optimum Notch Filtering: Step 2 (1)
f ( x, y ) g ( x, y ) w( x, y ) ( x, y )
02/09/2025 11
Optimum Notch Filtering: Step 2 (2)
a b 2
1 f ( x s, y t ) f ( x, y )
( x, y )
2
(2a 1)(2b 1) s a t b
02/09/2025 12
Assume that w(x,y) remains
essentially constant over
Optimum
the neighborhood Notch
gives the Filtering: Step (3)
approximation
w(x+s,
The localy+t) of f ( x, y ):
= w(x,y)
variance
a b 2
1 f ( x s, y t ) f ( x, y )
( x, y )
2
(2a 1)(2b 1) s a t b
2
a b g ( x s , y t ) w( x s , y t ) ( x s , y s )
1
(2a 1)(2b 1) s a t b g ( x, y ) w( x, y ) ( x, y )
2
a b g ( x s, y t ) w( x, y ) ( x s, y s )
1
(2a 1)(2b 1) s a t b g ( x, y ) w( x, y ) ( x, y )
02/09/2025 13
Optimum Notch Filtering: Step (4)
2 ( x, y )
To minimize 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
( x, y ) ( x, y )
2
02/09/2025 14
Optimum Notch Filtering: Example
02/09/2025 15
Optimum Notch Filtering: Example
02/09/2025 16
Optimum Notch Filtering: Example
02/09/2025
( x, y ) 1 H NP (u, v)G (u, v) 17
Optimum Notch Filtering: Example
02/09/2025 18
Linear, Position-Invariant Degradations
g ( x, y ) H f ( x, y ) ( x, y )
02/09/2025 19
Linear, Position-Invariant Degradations
H is linear
H af1 ( x, y ) bf 2 ( x, y ) aH f1 ( x, y ) bH f 2 ( x, y )
f1 and f 2 are any two input images.
02/09/2025 22
Linear, Position-Invariant Degradations
g ( x , y ) f ( , )h( x , y )d d ( x, y )
h( x, y ) f ( x, y ) ( x, y )
G (u , v) H (u , v) F (u , v) N (u , v)
02/09/2025 23
Estimating the Degradation Function
► Three principal ways to estimate the degradation
function
1. Observation
For example, if the image is blurred, we can look at a small rectangular section of the image containing
sample structures, like part of an object and the background. In order to reduce the effect of noise, we would
look for an area in which the signal content is strong (e.g., an area of high contrast). The next step would be
to process the subimage to arrive at a result that is as unblurred as possible. For example, we can do this by
sharpening the subimage with a sharpening filter and even by processing small areas by hand.
From the characteristics of this function, we then deduce the complete degradation function H(u, v)
2. Experimentation
obtain the impulse response of the degradation by imaging an impulse (small dot
of light) using the same system settings.
3. Mathematical Modeling
02/09/2025 24
Mathematical Modeling (1)
k ( u 2 v 2 )5/6
H (u, v) e
k : a constant that depends on
the nature of the turbulence
02/09/2025 25
02/09/2025 26
Mathematical Modeling (2)
02/09/2025 27
Mathematical Modeling (3)
02/09/2025 28
Mathematical Modeling (4)
T
g ( x, y ) f x x0 (t ), y y0 (t ) dt
0
G (u , v) g ( x , y )e
j 2 ( ux vy )
dxdy
f x x0 (t ), y y0 (t ) dt e j 2 (ux vy ) dxdy
T
0
f x x0 (t ), y y0 (t ) e j 2 (ux vy ) dxdy dt
T
0
T j 2 ux0 ( t ) vy0 ( t )
F (u, v)e dt
0
T j 2 ux0 ( t ) vy0 ( t )
F (u, v) e dt
0
02/09/2025 29
Mathematical Modeling (4)
T j 2 ux0 ( t ) vy0 ( t )
H (u , v) e dt
0
T j ua
sin( ua )e
ua
02/09/2025 30
Mathematical Modeling (5)
T
sin (ua vb) e j (ua vb )
(ua vb)
02/09/2025 31
02/09/2025 32
Inverse Filtering
F (u , v) H (u, v) N (u , v)
F (u , v)
H (u , v)
N (u, v)
F (u , v)
H (u , v)
02/09/2025 33
Inverse Filtering
N (u , v)
F (u , v) F (u , v)
H (u , v)
02/09/2025 34
Inverse Filtering
One approach is to limit the filter frequencies to values near the origin.
EXAMPLE
k 0.0025, M N 480.
02/09/2025 35
The poor
performance of
direct inverse
filtering in general
A Butterworth
lowpass
function of
order 10
02/09/2025 36
Minimum Mean Square Error (Wiener) Filtering
N. Wiener (1942)
Objective
Find an estimate of the uncorrupted image such that the mean
square error between them is minimized
e 2 E ( f f )2
02/09/2025 37
Minimum Mean Square Error (Wiener) Filtering
H *(u, v) S f (u, v)
F (u , v) 2 G (u , v)
S f (u , v) | H (u, v) | S (u, v)
H *(u, v)
2 G (u , v)
| H (u, v) | S (u, v) / S f (u, v)
1 | H (u , v) |2
2 G (u , v )
H (u , v) | H (u, v) | S (u, v) / S f (u, v)
02/09/2025 38
Minimum Mean Square Error (Wiener) Filtering
1 | H (u , v ) | 2
F (u , v) 2 G (u , v)
H (u , v) | H (u , v) | S (u , v) / S f (u , v)
H (u , v) : degradation function
H *(u , v): complex conjugate of H (u, v)
| H (u, v) |2 H *(u, v) H (u, v)
S (u , v) | N (u, v) |2 power spectrum of the noise
S f (u , v) | F (u , v) |2 power spectrum of the undegraded image
02/09/2025 39
Minimum Mean Square Error (Wiener) Filtering
1 | H (u , v ) | 2
F (u , v) 2 G (u , v)
H (u , v) | H (u , v) | K
02/09/2025 40
Minimum Mean Square Error (Wiener) Filtering
02/09/2025 41
Left:
degradate
d image
Middle:
inverse
filtering
Right:
Wiener
filtering
02/09/2025 42
Some Measures (1)
| F (u , v ) | 2
SNR Mu 01 Nv 01
| N (u
u 0 v 0
, v ) | 2
02/09/2025 43
Some Measures (2)
Root-Mean-Sqaure-Error (RMSE)
M 1 N1
f ( x, y ) 2
RMSE M 1 N 1u 0 v 0
f ( x, y ) |2
| f
u 0 v 0
( x , y )
02/09/2025 44
Constrained Least Squares Filtering
02/09/2025 45
Constrained Least Squares Filtering
H *(u, v)
F (u , v) 2
G (u , v)
| H (u , v) | | P (u, v) |
2
02/09/2025 46
Examples
02/09/2025 47
Geometric Mean Filter
1
H *(u, v) | H (u , v ) |2
F (u , v) G (u , v)
2
| H (u, v) | S (u, v) / S f (u , v)
2
| H (u , v ) |
02/09/2025 48