Professional Documents
Culture Documents
Module 3 2 DZRkw8i1IX
Module 3 2 DZRkw8i1IX
5/30/2022 103
5/30/2022 104
The Basic Filtering in the Frequency Domain
5/30/2022 105
The Basic Filtering in the Frequency Domain
g ( x, y ) 1{H (u , v) F (u , v)}
5/30/2022 106
The Basic Filtering in the Frequency Domain
5/30/2022 107
The Basic Filtering in the Frequency Domain
5/30/2022 108
The Basic Filtering in the Frequency Domain
5/30/2022 109
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
5/30/2022 110
Examples: Nonzero-Phase-Shift Filters
Even small
Phasechanges
angle is in the phase angle can ishave
Phase angle
dramaticmultiplied
(usually by undesirable) effects on the
multiplied by filtered
output 0.5 0.25
5/30/2022 111
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.
g p ( x, y ) real 1 G (u , v ) ( 1) x y
5/30/2022 113
An Example:
Steps for Filtering in the Frequency Domain
5/30/2022 114
Correspondence Between Filtering in the
Spatial and Frequency Domains (1)
5/30/2022 115
Correspondence Between Filtering in the
Spatial and Frequency Domains (2)
Let H (u ) denote the difference of Gaussian filter
- u 2 /212 - u 2 /2 22
H (u ) Ae Be
with A B and 1 2
5/30/2022 116
Correspondence Between Filtering in the
Spatial and Frequency Domains (3)
5/30/2022 117
Correspondence Between Filtering in the
Spatial and Frequency Domains: Example
600x600
5/30/2022 118
Correspondence Between Filtering in the
Spatial and Frequency Domains: Example
5/30/2022 119
Image Smoothing Using Filter Domain Filters:
ILPF
5/30/2022 120
Image Smoothing Using Filter Domain Filters:
ILPF
5/30/2022 121
ILPF Filtering Example
5/30/2022 122
ILPF ringing and
blurring
Filtering
Example
Ideal in frequency
domain means
non-ideal in
spatial domain,
vice versa.
5/30/2022 123
The Spatial Representation of ILPF
5/30/2022 124
Image Smoothing Using Filter Domain Filters:
BLPF
Butterworth Lowpass Filters (BLPF) of order n and
with cutoff frequency D0 • Smooth transfer
1 function, no sharp
H (u , v ) discontinuity, no
1 D (u , v ) / D0
2n
clear cutoff
frequency.
5/30/2022 125
The Spatial Representation of BLPF
5/30/2022 126
No
serious
ringing
artifacts
5/30/2022 127
Image Smoothing Using Filter Domain Filters:
GLPF
By letting D0
D 2 ( u ,v )/2 D02
H ( u , v) e
5/30/2022 129
GLPF
Frequency
domain
Spatial
domain
130
No
ringing
artifacts
5/30/2022 131
Examples of smoothing by GLPF (1)
5/30/2022 132
Examples of smoothing by GLPF (2)
5/30/2022 133
Examples of smoothing by GLPF (3)
5/30/2022 134
Examples of Lowpass Filtering
135
Image Sharpening Using Frequency Domain
Filters
H HP (u, v) 1 H LP (u, v)
5/30/2022 136
Image Sharpening Using Frequency Domain
Filters
5/30/2022 137
5/30/2022 138
The Spatial Representation of Highpass
Filters
5/30/2022 139
Filtering Results by IHPF
ringing artifacts
5/30/2022 140
Filtering Results by BHPF
5/30/2022 141
Filtering Results by GHPF
5/30/2022 142
Gaussian High-pass Filtering
143
Using Highpass Filtering and Threshold for
Image Enhancement
BHPF
(order 4 with a cutoff
frequency 50)
5/30/2022 144
Laplacian in Frequency Domain
¶ 2 f (x, y) ¶ 2 f (x, y)
[ ] (u 2
v 2
)F (u, v)
¶x 2
¶y 2
H 1(u, v) (u2 v2 )
Frequency
2 2
Spatial domain
2 ¶ f ¶ f domain
f 2 2 Laplacian operator
¶x ¶y
The Laplacian in the Frequency Domain
H (u , v) 4 2 (u 2 v 2 )
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 ) c -1
5/30/2022 146
The Laplacian in the Frequency Domain
1 1 4 2 D 2 (u, v) F (u, v)
5/30/2022 147
148
The Laplacian in the Frequency Domain
5/30/2022 149
Subtract Laplacian from the Original
Image to Enhance It
enhanced Original Laplacian
image image output
Frequency
G (u, v) F (u, v) (u2 v2 )F (u, v)
domain
new operator H 2 (u, v) 1 (u2 v2 ) 1 H 1 (u, v)
Laplacian
150
2 f
f
f 2 f
151
Unsharp Masking, Highboost Filtering and
High-Frequency-Emphasis Fitering
g mask ( x, y ) f ( x, y ) f LP ( x, y )
f LP ( x, y ) 1 H LP (u , v) F (u , v)
g ( x, y ) 1 1 k *1 H LP (u, v) F (u, v)
1 1 k * H HP (u , v ) F (u , v )
5/30/2022 152
Unsharp Masking, Highboost Filtering and
High-Frequency-Emphasis Fitering
1
g ( x, y ) k
1 k 2 * H HP (u , v) F (u , v)
k1 0 and k2 0
5/30/2022 153
154
5/30/2022 155
An image formation model
f x, y i x, y r x, y
0 i ( x, y )
0 r ( x, y ) 1
• i (x, y): illumination. It is determined by the illumination source.
• r (x, y): reflectance (or transmissivity). It is determined by the
characteristics of imaged objects.
156
Homomorphic Filtering
f x, y i x, y r x, y
157
Homomorphic Filtering
f ( x, y ) i ( x, y ) r ( x, y )
f ( x, y )
= i ( x, y ) r ( x, y ) ?
Not
separable
z ( x, y ) ln f ( x, y ) ln i ( x, y ) ln r ( x, y )
Z (u , v) Fi (u , v) Fr (u , v)
5/30/2022 158
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)
5/30/2022 159
Homomorphic Filtering
160
Homomorphic Filtering
162
Homomorphic Filtering
H (u, v) ( H L ) 1 e
c D 2 ( u , v )/ D02
L
5/30/2022 163
L 0.25
Homomorphic
H 2
Filtering
c 1
D0 80
5/30/2022 164
Homomorphic Filtering
5/30/2022 165
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
5/30/2022 166
Selective Filtering:
Bandreject and Bandpass Filters
H BP (u, v) 1 H BR (u, v)
5/30/2022 167
Selective Filtering:
Bandreject and Bandpass Filters
5/30/2022 168
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).
2 1/2
D k (u, v) (u M / 2 uk ) (v N / 2 vk )
2
5/30/2022 170
Examples:
Notch
Filters (1)
A Butterworth notch
reject filter D 0 =3
and n=4 for all
notch pairs
5/30/2022 171
Examples:
Notch Filters
(2)
5/30/2022 172
5/30/2022 173