CS589-04 Digital Image Processing Lecture 3. Filtering in the Frequency Domain Spring 2008 New Mexico Tech.

Download Report

Transcript CS589-04 Digital Image Processing Lecture 3. Filtering in the Frequency Domain Spring 2008 New Mexico Tech.

CS589-04 Digital Image Processing
Lecture 3. Filtering in the
Frequency Domain
Spring 2008
New Mexico Tech
Outline
►
Fourier Transform
►
Filtering in Fourier Transform Domain
11/6/2015
2
Fourier Series and Fourier Transform: History
►
Jean Baptiste Joseph Fourier, French mathematician and physicist
(03/21/1768-05/16/1830)
Orphaned: at nine
Egyptian expedition
with Napoleon I:
1798
Governor of Lower
Egypt
http://en.wikipedia.org/wiki/Joseph_Fourier
Permanent
Secretary of the
French Academy of
Sciences: 1822
Théorie analytique
de la chaleur :
1822
(The Analytic
Theory of Heat)
11/6/2015
3
Fourier Series and Fourier Transform: History
►
Fourier Series
Any periodic function can be expressed as the sum of sines
and /or cosines of different frequencies, each multiplied by
a different coefficients
►
Fourier Transform
Any function that is not periodic can be expressed as the
integral of sines and /or cosines multiplied by a weighing
function
11/6/2015
4
Fourier Series: Example
11/6/2015
5
Preliminary Concepts
j  1, a complex number
C  R  jI
the conjugate
C*  R - jI
| C | R 2  I 2 and   arctan( I / R)
C | C | (cos   j sin  )
Using Euler's formula,
C | C | e j
11/6/2015
6
Fourier Series
A function f (t ) of a continuous variable t that is periodic
with period, T , can be expressed as the sum of sines and
cosines multiplied by appropriate coefficients
f (t ) 

ce
n 
j
2 n
t
T
n
where
2 n
j
t
1 T /2
T
cn  
f (t )e
dt
T T /2
11/6/2015
for n  0, 1, 2,...
7
Impulses and the Sifting Property (1)
A unit impulse of a continuous variable t located
at t =0, denoted  (t ), defined as
if t  0

 (t )  
if t  0
0
and is constrained also to satisfy the identity



 (t )dt  1
The sifting property



11/6/2015



f (t ) (t  t0 )dt  f (t0 )
f (t ) (t ) dt  f (0)
8
Impulses and the Sifting Property (2)
A unit impulse of a discrete variable x located
at x =0, denoted  ( x), defined as
if x  0
1
 ( x)  
if x  0
0
and is constrained also to satisfy the identity

  ( x)  1
x 
The sifting property


f ( x) ( x)  f (0)


x 
f ( x) ( x  x0 )  f ( x0 )
x 
11/6/2015
9
Impulses and the Sifting Property (3)
impulse train sT (t ),
sT (t ) 
11/6/2015

  (t  nT )
n 
10
Fourier Transform: One Continuous Variable
The Fourier Transform of a continous function f (t )
F (  )  { f (t )}  


f (t )e j 2t dt
The Inverse Fourier Transform of F (  )

f (t )   {F (  )}   F (  )e j 2t d 
1

11/6/2015
11
Fourier Transform: One Continuous Variable
F ( )  


f (t )e
 j 2 t
dt  
W /2
W /2
Ae  j 2t dt
A
A
 j 2 t W /2
e

e jW  e  jW 


W /2
j 2
j 2 W
sin(W )
 AW
(W )
11/6/2015
12
Fourier Transform: Impulses
The Fourier transform of a unit impulse located at the origin:

F (  )    (t )e j 2t dt

 e j 2 0
=1
The Fourier transform of a unit impulse located at t  t0 :

F (  )    (t  t0 )e  j 2t dt

 e  j 2t0
=cos(2 t0 )  j sin (2 t0 )
11/6/2015
13
Fourier Transform: Impulse Trains
sT (t ) 
Impulse train sT (t ),

  (t  nT )
n 
The Fourier series:
sT (t ) 

c
n 
n
e
j
2 n
t
T
where
1
cn 
T
11/6/2015

T /2
T /2
sT (t )e
j
2 n
t
T
dt
14
Fourier Transform: Impulse Trains
 j 21Tn t T /2  j 2Tjn2tTn t j 2t 1 T /2 j 2Tnjt2Tnt j 2t
s (et )e e dt = dt  e(t )e e dt dt
cn e T 
T /2 T
/2
T T 

 1  1
=

0
e

n

j
2

(


T
TT) t
n
 e
dt   (  
)

T


1
2 n n 
2 n n

  ( j T t ) 1   ( j  t )e j 2t du
 e T T
sT (t )  c n e T  
T n
n 2 nt
e
11/6/2015
j
T
15
Fourier Transform: Impulse Trains
Let S (  ) denote the Fourier transform of the
periodic impulse train ST (t )
 1
S (  )  ST (t )   
 T

e
n 
j
2 n
t
T



2 n

j
t

1
T

  e

T n 

1 
n
=
 ( 
)

T n 
T
11/6/2015
16
Fourier Transform and Convolution
The convolution of two functions is denoted
by the operator
f (t )
 f (t )
h(t )  


f ( )h(t   )d


h(t )    f ( ) h(t   ) d e  j 2t dt

 
 



=  f ( )  h(t   )e  j 2t dt d
 



=


f ( )  H (  )e  j 2 d
=H (  ) 


f ( )e  j 2 d
=H (  ) F (  )
11/6/2015
17
Fourier Transform and Convolution
Fourier Transform Pairs
f (t ) h(t )  H ( ) F (  )
f (t )h(t )  H (  ) F (  )
11/6/2015
18
Fourier Transform of Sampled Functions
f (t )  f (t ) sT (t )



f (t ) (t  nT )
n 
11/6/2015
19
Fourier Transform of Sampled Functions
 
F (  )   f (t )   f (t ) sT (t )  F (  ) ? S (  )

F (  )  F1(  ) S (  )  n F ( ) S (    )d

S ( ) 

(


)

 T
1T n 

n
=
F ( )   (    
)d


T
T
n 
1  
n
=
F ( ) (   
)d



T n 
T
1 
n
=
F ( 
)

T n 
T
11/6/2015
20
Question
The Fourier transform of the
sampled function (shown in the
following figure) is
1. Continuous
2. Discrete
11/6/2015
21
Fourier Transform of Sampled Functions
►
A bandlimited signal is a signal whose Fourier transform
is zero above a certain finite frequency. In other words, if
the Fourier transform has finite support then the signal is
said to be bandlimited.
An example of a simple bandlimited signal is a sinusoid of
the form,
x(t )  sin(2 ft   )
11/6/2015
22
Fourier Transform of Sampled Functions
max
F ( ) 
1
T

n
F ( 
)

T
n 
11/6/2015
max
Over-sampling
1
 2  max
T
Critically-sampling
1
 2  max
T
under-sampling
1
 2  max
T
23
Nyquist–Shannon sampling theorem
►
►
We can recover f (t ) from its sampled version if we can
isolate a copy of F (  ) from the periodic sequence of copies
of this function contained in F (  ), the transform of the
sampled function f (t )
Sufficient separation is guaranteed if
1
 2  max
T
Sampling theorem: A continuous, band-limited function
can be recovered completely from a set of its samples if
the samples are acquired at a rate exceeding twice the
highest frequency content of the function
11/6/2015
24
Nyquist–Shannon sampling theorem
?

f (t )   F (  )e j 2t d 

11/6/2015
25
Aliasing
If a band-limited function is sampled at a rate that is less
than twice its highest frequency?
The inverse transform will yield a corrupted function. This
effect is known as frequency aliasing or simply as
aliasing.
11/6/2015
26
Aliasing
11/6/2015
27
Aliasing
11/6/2015
28
Function Reconstruction from Sampled Data
F ( )  H ( ) F ( )
1
f (t )  
1

F ( )
H ( )F ( )
 h(t ) f (t )
f (t ) 


n 
11/6/2015
f (nT )sinc  (t  nT ) / nT 
29
The Discrete Fourier Transform (DFT) of One
Variable
M 1
F (  )   f ( x)e j 2 x / M ,
 0,1,..., M  1
x 0
1
f ( x) 
M
11/6/2015
M 1
j 2 x / M
F
(

)
e
,

x  0,1, 2,..., M  1
 0
30
2-D Impulse and Sifting Property: Continuous
The impulse  (t , z ),

 
and

 

 (t , z )  
0
if t  z  0
otherwise
 (t , z )dtdz  1
The sifting property

 



 
f (t , z ) (t , z )dtdz  f (0, 0)
and
 
 
11/6/2015
f (t , z ) (t  t0 , z  z0 )dtdz  f (t0 , z0 )
31
2-D Impulse and Sifting Property: Discrete
The impulse  ( x, y),
1
 ( x, y)  
0
if x  y  0
otherwise
The sifting property



f ( x, y ) ( x, y )  f (0, 0)
x  y 
and



x  y 
11/6/2015
f ( x, y ) ( x  x0 , y  y0 )  f ( x0 , y0 )
32
2-D Fourier Transform: Continuous
F (  , )  



 
f (t , z )e
 j 2 ( t  z )
dtdz
and
f (t , z )  



 
11/6/2015
f (  , )e j 2 ( t  z ) d  d
33
2-D Fourier Transform: Continuous

F (  , )  


 

T /2

f (t , z )e  j 2 ( t  z ) dtdz
Z /2
T /2  Z /2
Ae  j 2 ( t  z ) dtdz
 sin(T )   sin( T ) 
 ATZ 
   T 

T



11/6/2015
34
2-D Sampling and 2-D Sampling Theorem
2  D impulse train:
sT Z (t , z ) 
11/6/2015


   (t  mT , z  nZ )
m  n 
35
2-D Sampling and 2-D Sampling Theorem
Function f (t , z ) is said to be band-limited if its Fourier transform
is 0 outside a rectangle established by the intervals [-max ,max ]
and [- max , max ], that is
F (  , )  0 for |  | max and |  |  max
Two-dimensional sampling theorem:
A continuous, band-limited function f (t , z ) can be recovered with
no error from a set of its samples if the sampling intervals are
T<
11/6/2015
1
2max
and Z<
1
2 max
36
2-D Sampling and 2-D Sampling Theorem
11/6/2015
37
Aliasing in Images: Example
In an image system, the
number of samples is fixed at
96x96 pixels. If we use this
system to digitize checkerboard
patterns …
Under-sampling
11/6/2015
38
Aliasing in Images: Example
Re-sampling
11/6/2015
39
Aliasing in Images: Example
Re-sampling
11/6/2015
40
Moiré patterns
►
Moiré patterns are often an undesired artifact of images
produced by various digital imaging and computer graphics
techniques
e. g., when scanning a halftone picture or ray tracing a
checkered plane. This cause of moiré is a special case of
aliasing, due to under-sampling a fine regular pattern
http://en.wikipedia.org/wiki/Moiré_pattern
11/6/2015
41
Moiré patterns
11/6/2015
42
Moiré patterns
11/6/2015
43
Moiré patterns
A moiré pattern
formed by
incorrectly downsampling the
former image
11/6/2015
44
2-D Discrete Fourier Transform and Its
Inverse
DFT:
M 1 N 1
F (  , )    f ( x, y )e
 j 2 (  x / M  y / N )
x 0 y 0
  0,1, 2,..., M  1;  0,1, 2,..., N  1;
f ( x, y ) is a digital image of size M  N.
IDFT:
1
f ( x, y) 
MN
11/6/2015
M 1 N 1
 F (, )e
j 2 (  x / M  y / N )
x 0 y 0
45
Properties of the 2-D DFT
relationships between spatial and frequency intervals
Let T and Z denote the separations between samples,
then the seperations between the corresponding discrete,
frequency domain variables are given by
1
 
M T
1
and
 
N Z
11/6/2015
46
Properties of the 2-D DFT
translation and rotation
f ( x, y )e j 2 ( 0 x / M  0 y / N )  F (   0 ,  0 )
and
f ( x - x0 , y - y0 )  F (  , )e
 j 2 (  x0 / M  y0 / N )
Using the polar coordinates
x  r cos  y=rsin  =cos
 = sin 
results in the following transform pair:
f (r ,   0 )  F (,   0 )
11/6/2015
47
Properties of the 2-D DFT
periodicity
2  D Fourier transform and its inverse are infinitely periodic
F (  , )  F (   k1M , )  F ( ,  k2 N )  F (  k1M ,  k2 N )
f ( x, y)  f ( x  k1M , y)  f ( x, y  k2 N )  f ( x  k1M , y  k2 N )
f ( x)e
j 2 ( 0 x / M )
0  M / 2,
f ( x, y)(1)
11/6/2015
 F (  0 )
f ( x)(1)  F (  M / 2)
x
x y
 F (  M / 2,  N / 2)
48
Properties of the 2-D DFT
periodicity
11/6/2015
49
Properties of the 2-D DFT
Symmetry
11/6/2015
50
Properties of the 2-D DFT
Fourier Spectrum and Phase Angle
2-D DFT in polar form
F (u, v) | F (u, v) | e j (u ,v )
Fourier spectrum
1/2
| F (u, v) |  R (u, v)  I (u, v) 
2
2
Power spectrum
P(u, v) | F (u, v) |2  R 2 (u, v)  I 2 (u, v)
Phase angle
 I (u, v) 
 (u,v)=arctan 

R
(
u
,
v
)


11/6/2015
51
11/6/2015
52
11/6/2015
53
Example: Phase Angles
11/6/2015
54
Example: Phase Angles and The Reconstructed
11/6/2015
55
2-D Convolution Theorem
1-D convolution
M 1
f ( x ) h ( x )   f ( m) h ( x  m)
m 0
2-D convolution
M 1 N 1
f ( x, y ) h( x, y )   f (m, n )h( x  m, y  n )
m 0 n 0
x  0,1,2,..., M  1; y  0,1,2,..., N  1.
f ( x, y ) h( x, y )  F (u, v) H (u, v)
f ( x, y )h( x, y )  F (u, v) H (u, v)
11/6/2015
56
An Example of Convolution
Mirroring h
about the
origin
Translating
the mirrored
function by x
Computing the
sum for each
x
11/6/2015
57
An Example of Convolution
It causes the
wraparoun
d error
It can be
solved by
appending
zeros
11/6/2015
58
Zero Padding
►
Consider two functions f(x) and h(x) composed of A and B
samples, respectively
►
Append zeros to both functions so that they have the same
length, denoted by P, then wraparound is avoided by
choosing
P ≥A+B-1
11/6/2015
59
Zero Padding
►
Let f(x,y) and h(x,y) be two image arrays of sizes A×B and
C×D pixels, respectively. Wraparound error in their
convolution can be avoided by padding these functions
with zeros
 f ( x, y )
f p ( x, y )  
 0
0  x  A -1 and 0  y  B -1
 h ( x, y )
h p ( x, y )  
 0
0  x  C -1 and 0  y  D -1
A  x  P or B  y  Q
C  x  P or D  y  Q
Here P  A  C  1; Q  B  D  1
11/6/2015
60
Summary
11/6/2015
61
Summary
11/6/2015
62
Summary
11/6/2015
63
Summary
11/6/2015
64
The Basic Filtering in the Frequency Domain
Why is the spectrum at
almost ±45 degree stronger
than the spectrum at other
directions?
11/6/2015
65
The Basic Filtering in the Frequency Domain
►
Modifying the Fourier transform of an image
►
Computing the inverse transform to obtain the processed
result
g ( x, y )  1{H (u, v) F (u, v)}
F (u, v) is the DFT of the input image
H (u, v) is a filter function.
11/6/2015
66
The Basic Filtering in the Frequency Domain
►
In a filter H(u,v) that is 0 at the center of the transform
and 1 elsewhere, what’s the output image?
11/6/2015
67
The Basic Filtering in the Frequency Domain
11/6/2015
68
The Basic Filtering in the Frequency Domain
11/6/2015
69
Zero-Phase-Shift Filters
1
g ( x, y)   {H (u, v) F (u, v)}
F (u, v)  R(u, v)  jI (u, v)
1
g ( x, y)  
 H (u, v)R(u, v)  jH (u, v)I (u, v)
Filters affect the real and imaginary parts equally,
and thus no effect on the phase.
These filters are called zero-phase-shift filters
11/6/2015
70
Examples: Nonzero-Phase-Shift Filters
Even small
in the phase angle
can ishave
Phasechanges
angle is
Phase angle
by undesirable) effects
dramaticmultiplied
(usually
on the
multiplied
by filtered
0.5
0.5
output
11/6/2015
71
Summary:
Steps for Filtering in the Frequency Domain
1. Given an input image f(x,y) of size MxN, obtain the
padding parameters P and Q. Typically, P = 2M and Q = 2N.
2. Form a padded image, fp(x,y) of size PxQ by
appending the necessary number of zeros to f(x,y)
3. Multiply fp(x,y) by (-1)x+y to center its transform
4. Compute the DFT, F(u,v) of the image from step 3
5. Generate a real, symmetric filter function*, H(u,v), of
size PxQ with center at coordinates (P/2, Q/2)
*generate from a given spatial filter, we pad the spatial filter, multiply the expadded
array by (-1)x+y, and compute the DFT of the result to obtain a centered H(u,v).
11/6/2015
72
Summary:
Steps for Filtering in the Frequency Domain
6. Form the product G(u,v) = H(u,v)F(u,v) using array
multiplication
7. Obtain the processed image


g p ( x, y )  real  1 G (u, v) (1) x  y
8. Obtain the final processed result, g(x,y), by extracting
the MxN region from the top, left quadrant of gp(x,y)
11/6/2015
73
An Example:
Steps for Filtering in the Frequency Domain
11/6/2015
74
Correspondence Between Filtering in the
Spatial and Frequency Domains (1)
Let H(u) denote the 1-D frequency domain Gaussian filter
H (u)  Ae
-u 2 /2 2
The corresponding filter in the spatial domain
h( x)  2 Ae
2 2 2 x2
1. Both components are Gaussian and real
2. The functions behave reciprocally
11/6/2015
75
Correspondence Between Filtering in the
Spatial and Frequency Domains (2)
Let H (u ) denote the difference of Gaussian filter
H (u )  Ae
- u 2 /212
 Be
- u 2 /2 22
with A  B and  1   2
The corresponding filter in the spatial domain
h( x)  2 1 Ae
2 212 x 2
 2 2 Ae
2 2 22 x2
High-pass filter or low-pass filter ?
11/6/2015
76
Correspondence Between Filtering in the
Spatial and Frequency Domains (3)
11/6/2015
77
Correspondence Between Filtering in the
Spatial and Frequency Domains: Example
600x600
11/6/2015
78
Correspondence Between Filtering in the
Spatial and Frequency Domains: Example
11/6/2015
79
Generate H(u,v)
0  x  599 and 0  y  599
 f ( x, y)
f p ( x, y)  
600  x  602 or 600  y  602
 0
h( x, y)
hp ( x, y)  
0
0  x  2 and 0  y  2
3  x  602 or 3  y  602
Here P  A(600)  C (3)  1  602;
Q  B(600)  D(3)  1  602.
11/6/2015
80
Generate H(u,v)
1. Multiply hp ( x, y) by (-1)x y to center the frequency domain filter
2. Compute the forward DFT of the result in (1)
3. Set the real part of the resulting DFT to 0 to account for
parasitic real parts
4. Multiply the result by (-1)u v , which is implicit when h( x, y)
was moved to the center of hp ( x, y).
11/6/2015
81
Image Smoothing Using Filter Domain Filters:
ILPF
Ideal Lowpass Filters (ILPF)
1 if D(u, v)  D0
H (u, v)  
0 if D(u, v)  D0
D0 is a positive constant and D(u, v) is the distance between a point (u, v)
in the frequency domain and the center of the frequency rectangle
2 1/2
D(u, v)  (u  P / 2)  (v  Q / 2) 
2
11/6/2015
82
Image Smoothing Using Filter Domain Filters:
ILPF
11/6/2015
83
ILPF Filtering Example
11/6/2015
84
ILPF
Filtering
Example
11/6/2015
85
The Spatial Representation of ILPF
11/6/2015
86
Image Smoothing Using Filter Domain Filters:
BLPF
Butterworth Lowpass Filters (BLPF) of order n and
with cutoff frequency D0
H (u , v ) 
11/6/2015
1
1   D(u, v) / D0 
2n
87
11/6/2015
88
The Spatial Representation of BLPF
11/6/2015
89
Image Smoothing Using Filter Domain Filters:
GLPF
Gaussian Lowpass Filters (GLPF) in two dimensions is given
H (u, v)  e
 D2 ( u ,v )/2 2
By letting   D0
H (u, v)  e
11/6/2015
 D 2 ( u ,v )/2 D02
90
Image Smoothing Using Filter Domain Filters:
GLPF
11/6/2015
91
11/6/2015
92
Examples of smoothing by GLPF (1)
11/6/2015
93
Examples of smoothing by GLPF (2)
11/6/2015
94
Examples of smoothing by GLPF (3)
11/6/2015
95
Image Sharpening Using Frequency Domain
Filters
A highpass filter is obtained from a given lowpass filter
using
H HP (u, v)  1  H LP (u, v)
A 2-D ideal highpass filter (IHPL) is defined as
0 if D(u, v)  D0
H (u, v)  
1 if D(u, v)  D0
11/6/2015
96
Image Sharpening Using Frequency Domain
Filters
A 2-D Butterworth highpass filter (BHPL) is defined as
1
H (u, v) 
2n
1   D0 / D(u, v)
A 2-D Gaussian highpass filter (GHPL) is defined as
H (u , v )  1  e
11/6/2015
 D2 ( u ,v )/2 D02
97
11/6/2015
98
The Spatial Representation of Highpass
Filters
11/6/2015
99
Filtering Results by IHPF
11/6/2015
100
Filtering Results by BHPF
11/6/2015
101
Filtering Results by GHPF
11/6/2015
102
Using Highpass Filtering and Threshold for
Image Enhancement
BHPF
(order 4 with a cutoff
frequency 50)
11/6/2015
103
The Laplacian in the Frequency Domain
H (u, v)  4 2 (u 2  v2 )
H (u, v)  4 2 (u  P / 2) 2  (v  Q / 2) 2 ) 
 4 2 D 2 (u, v)
The Laplacian image
2 f ( x, y)  1 H (u, v) F (u, v)
Enhancement is obtained
g ( x, y)  f ( x, y)  c2 f ( x, y)
11/6/2015
c  -1
104
The Laplacian in the Frequency Domain
The enhanced image
F (u, v)  H (u, v) F (u, v)
 1 1  H (u, v)  F (u, v)
1
g ( x, y )  


 1 1  4 2 D 2 (u, v)  F (u, v)
11/6/2015
105
The Laplacian in the Frequency Domain
11/6/2015
106
Unsharp Masking, Highboost Filtering and
High-Frequency-Emphasis Fitering
gmask ( x, y)  f ( x, y)  f LP ( x, y)
f LP ( x, y)  1  HLP (u, v)F (u, v)
Unsharp masking and highboost filtering
g ( x, y)  f ( x, y)  k * g mask ( x, y)


g ( x, y)  1 1  k *1  H LP (u, v) F (u, v)
 1 1  k * H HP (u, v) F (u, v)
11/6/2015
107
Unsharp Masking, Highboost Filtering and
High-Frequency-Emphasis Fitering
g ( x, y )  1  k1  k2 * H HP (u, v)  F (u, v)
k1  0 and k2  0
11/6/2015
108
Gaussian Filter
D0=40
High-Frequency-Emphasis Filtering
Gaussian Filter
K1=0.5, k2=0.75
11/6/2015
109
Homomorphic Filtering
f ( x, y)  i( x, y)r ( x, y)
= i( x, y) r ( x, y)
 f ( x, y) 
?
z ( x, y)  ln f ( x, y)  ln i( x, y)  ln r ( x, y)
z( x, y)  ln f ( x, y)  ln i( x, y)  ln r( x, y)
Z (u, v)  Fi (u, v)  Fr (u, v)
11/6/2015
110
Homomorphic Filtering
S (u, v)  H (u, v) Z (u, v)
 H (u, v) Fi (u, v)  H (u, v) Fr (u, v)
s( x, y)  1 S (u, v)
 1 H (u, v) Fi (u, v)  H (u, v) Fr (u, v)
 1 H (u, v) Fi (u, v)  1 H (u, v) Fr (u, v)
 i '( x, y)  r '( x, y)
g ( x, y)  es ( x, y )  ei '( x, y )er '( x, y)  i0 ( x, y)r0 ( x, y)
11/6/2015
111
Homomorphic Filtering
The illumination component of an image generally is
characterized by slow spatial variations, while the
reflectance component tends to vary abruptly
These characteristics lead to associating the low
frequencies of the Fourier transform of the logarithm of an
image with illumination the high frequencies with
reflectance.
11/6/2015
112
Homomorphic Filtering
H (u, v)  ( H   L ) 1  e

 c  D 2 ( u , v )/ D02 


 
 L
Attenuate the contribution
made by illumination and
amplify the contribution made
by reflectance
11/6/2015
113
 L  0.25
Homomorphic
H  2
Filtering
c 1
D0  80
11/6/2015
114
Homomorphic Filtering
11/6/2015
115
Selective Filtering
Non-Selective Filters:
operate over the entire frequency rectangle
Selective Filters
operate over some part, not entire frequency rectangle
• bandreject or bandpass: process specific bands
• notch filters: process small regions of the frequency
rectangle
11/6/2015
116
Selective Filtering:
Bandreject and Bandpass Filters
H BP (u, v)  1  H BR (u, v)
11/6/2015
117
Selective Filtering:
Bandreject and Bandpass Filters
11/6/2015
118
Selective Filtering:
Notch Filters
Zero-phase-shift filters must be symmetric about the origin.
A notch with center at (u0, v0) must have a corresponding
notch at location (-u0,-v0).
Notch reject filters are constructed as products of highpass
filters whose centers have been translated to the centers of
the notches.
Q
H NR (u, v)   H k (u, v) H  k (u, v)
k 1
where H k (u, v) and H - k (u, v) are highpass filters whose centers are
at (uk , vk ) and (-uk , -vk ), respectively.
11/6/2015
119
Selective Filtering:
Notch Filters
Q
H NR (u, v)   H k (u, v) H  k (u, v)
k 1
where H k (u, v) and H - k (u, v) are highpass filters whose centers are
at (uk , vk ) and (-uk , -vk ), respectively.
A Butterworth notch reject filter of order n



1
1
H NR (u, v)   
2n  
2n 
k 1 1   D0 k / Dk (u , v)   1   D0 k / D k (u , v)  



3
2 1/2
Dk (u, v)  (u  M / 2  uk )  (v  N / 2  vk ) 
2
2 1/2
D k (u, v)  (u  M / 2  uk )  (v  N / 2  vk ) 
2
11/6/2015
120
Examples:
Notch
Filters (1)
A Butterworth notch
reject filter D0 =3
and n=4 for all
notch pairs
11/6/2015
121
Examples:
Notch Filters
(2)
11/6/2015
122
11/6/2015
123