Frequency Domain Filtering: CS474/674 - Prof. Bebis
Frequency Domain Filtering: CS474/674 - Prof. Bebis
Frequency Domain Filtering: CS474/674 - Prof. Bebis
(1) Low-pass
(2) High-pass
(3) Band-pass
(4) Band-stop
Example
Original signal
Low-pass filtered
High-pass filtered
Band-pass filtered
Band-stop filtered
Low-pass filters
(i.e., smoothing filters)
• Preserve low frequencies - useful for noise suppression
Example:
High-pass filters
(i.e., sharpening filters)
• Preserves high frequencies - useful for edge detection
spatial
domain
frequency
domain
Example:
Band-pass filters
frequency spatial
domain domain
Example:
Band-stop filters
Band-pass Band-stop
Frequency Domain Methods
F(u,v)
H(u,v) - centered G(u,v)=F(u,v)H(u,v)
gp(x,y) g(x,y)
(Case 2) h(x,y) specified in spatial domain
600 x 600
frequency
spatial
Sobel
Example: 6 x 6
g(x,y)= -g(6-x,6-y)
0 0 0 0 0 0
0 0 0 0 0 0
Sobel 0 0 -1 0 1 0
0 0 -2 0 2 0
0 0 -1 0 1 0
0 0 0 0 0 0
Recall the following FT properties:
Low Pass (LP) Filters
• Common LP filters
– Ideal low-pass filter (ILPF)
– Butterworth low-pass filter (BLPF)
– Gaussian low-pass filter (GLPF)
Low-pass (LP) filtering
r: radius
r=43 (95%) r=78 (99%) r=152 (99.5%)
How does D0 (cut-off frequency) control
smoothing?
• Reminder: multiplication in the frequency domain implies
convolution in the time domain
time domain freq. domain
sinc
*
=
How does D0 (cut-off frequency) control
smoothing?
Recall the following result:
magnitude
r=8 (90%)
Ringing Effect
h=f*g
Butterworth LP filter (BLPF)
D0=10, 30,
60, 160,
460
D0=10, 30,
60, 160, n=2
460
Gaussian LP filter (GLPF)
Gaussian Lowpass Filters (GLPF) in two dimensions is given
( u 2 v2 )/2 2
H (u, v) e
By letting D0
( u 2 v2 )/2 D02
H (u, v) e
Gaussian: Frequency – Spatial Domains
Let H(u) denote the 1-D frequency domain Gaussian filter
-u 2 /2 2
H (u) Ae
spatial
frequency domain
domain
Example: smoothing by GLPF (1)
Examples of smoothing by GLPF (2)
D0=100
D0=80
10/28/2019 32
High Pass (LP) Filters
• Common HO filters
– Ideal high-pass filter (IHPF)
– Butterworth high-pass filter (BHPF)
– Gaussian high-pass filter (GHPF)
– Difference of Gaussians
– Unsharp Masking and High Boost filtering
High-pass filtering
H(u)
High-Pass filtering (cont’d)
H HP (u, v) 1 H LP (u, v)
=1-
D0
Butterworth high pass filter (BHPF)
• In practice, we use filters that attenuate low frequencies
smoothly (e.g., Butterworth HP filter) less ringing
effect
1-
Spatial Representation of High-pass Filters
IHPF BHPF GHPF
Comparison: IHPF and BHPF
IHPF D0=30,60,160
D0=30,60,160
BHPF n=2
Gaussian HP filter
A 2-D Gaussian highpass filter (GHPL) is defined as
( u 2 v 2 )/2 D02
H (u, v) 1 e
GHPF
BHPF
Comparison: BHPF and GHPF
BHPF D0=30,60,160
n=2
D0=30,60,160
GHPF
Example: High-pass Filtering and Thresholding
for Fingerprint Image Enhancement
BHPF
(order 4 with a cutoff
frequency 50)
Difference of Gaussians (DoG) filter
Unsharp Masking:
gmask ( x, y) f ( x, y) f LP ( x, y)
g ( x, y) ( A 1) f ( x, y) f HP ( x, y)
Highboost filtering:
(previous formulation) g ( x, y) ( A 1) f ( x, y) f HP ( x, y)
g ( x, y) f ( x, y) kgmask ( x, y) f ( x, y) k ( f ( x, y) f LP ( x, y))
FT
G (u, v) F{ f ( x, y ) k ( f ( x, y ) f LP ( x, y ))}
F (u, v) k ( F (u, v) H LP (u, v) F (u, v))
[1 k (1 H LP (u, v))]F (u, v) [1 kH HP (u, v)]F (u, v)
1
Highboost Filter
so : g ( x, y ) F {[1 kH HP (u, v)]F (u, v)}
Highboost and High-Frequency-Emphasis Filters
1+k k1+k2
1 k1
High-emphasis
Highboost
Example
GHPF
D0=40
High-emphasis High-emphasis
and hist. equal.
High-Frequency
Emphasis filtering
Using Gaussian filter
k1=0.5, k2=0.75
Homomorphic filtering
• Can be used to remove shading effects in an image (i.e.,
due to uneven illumination)
– Enhance high frequencies
– Attenuate low frequencies but preserve fine detail.
Homomorphic Filtering (cont’d)
• Idea:
Take the ln( ) of
Steps of Homomorphic Filtering
(1) Take
or
or
L 0.25
H 2
c 1
D0 80