SlideShare ist ein Scribd-Unternehmen logo
1 von 120
Downloaden Sie, um offline zu lesen
Filtering in Frequency Domain
Upendra
Indian Institute of Information Technology, Allahabad
Image and Video Processing
February 26, 2017
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 1 / 120
Background I
Time Domain and Frequency Domain Analysis
Time Domain Analysis
1 Applications: predictions, fitting regression models etc[7].
2 Different types of equipments in each field
Frequency Domain Analysis
1 Motivation: conversion of complex differentials into polynomial
equations
2 Inverse transform feasible (take care of rules though)
3 Different transforms like Fourier, Laplace, Z etc.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 2 / 120
Periodic Signals I
1 A signal f (t) that satisfies
f (t) = f (t + T) ∀t ⊆ (1)
2 In general,
f (t) = f (t ± T) = f (t ± 2T) = ... = f (t ± nT) (2)
3 T fixed called period
4 Smallest value of T called Principal Period
5 Principal period Vs Period ?
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 3 / 120
Background I
1 Proposed by French mathematician Jean Baptise Joseph Fourier [2]
2 Any periodic signal = sum of sines and/or cosines terms of different
frequencies.
3 Each term multiplied by a coefficient
4 Coefficients value determines the term’s contribution [3].
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 4 / 120
Dirichlet Conditions I
1 Named after Peter Gustav Lejeune Dirichlet [6].
2 Provides sufficient conditions for a real valued signal to be equal to its
fourier series sum
3 Conditions are
Signal must be absolutely integrable over a period
Finite number of extrema points in any given interval
Finite number of discontinuities in any given interval
4 Such a function is said to have a bounded variation over a period [6]
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 5 / 120
Definition I
Fourier Series [2][3][5]
A signal f(t) of a continuous variable ’t’ that is periodic with period ’T’,
can be expressed as
f (t) =
∞
n=−∞
cn ej 2πn
T
t
(3)
where
cn =
T
2
−T
2
f (t) e−j 2πn
T
t
for n = 0, ±1, ±2.... (4)
are the coefficients.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 6 / 120
Background I
Characteristics of Fourier Series Representation [2]
1 Holds good for all functions (complication immaterial)
2 The original function can be reconstructed completely; hence, a
lossless transformation[1][2]
3 Flexibility in terms of domain switch
4 Industries and Academic institutions alike
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 7 / 120
Problem-01 I
Find the Fourier Series Coefficients of the following signal:
Figure: Calculation of Fourier Series Coefficients for the above signal
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 8 / 120
Problem-02 I
Find the Fourier Series Coefficients of the following signal:
Figure: Calculation of Fourier Series Coefficients for the above signal
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 9 / 120
Properties of Fourier Series [1][2][3] I
Assuming
x(t) ⇐⇒ {cn} ; y(t) ⇐⇒ {dn} (5)
Linearity
Ax(t) + By(t) ⇐⇒ {Acn + Bdn} (6)
Multiplication
x(t)y(t) ⇐⇒ {
∞
k=−∞
ckdn−k} (7)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 10 / 120
Properties of Fourier Series I
Time Shifting
x(t − t0) ⇐⇒ {e
−j2πnt0
T cn} (8)
Time Reversal
x(−t) ⇐⇒ {c−n} (9)
Conjugation
x∗
(t) ⇐⇒ {c∗
−n} (10)
Time Scaling property
x(at) ⇐⇒
∞
n=−∞
cne
j2πn(at)
T (11)
Time scaling, thus, changes the frequency components [3].
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 11 / 120
Impulse functions and Time Shift Property I
Definition
δ(t) =
1, if t = 0,
0, if t = 0.
(12)
Subjected to,
∞
−∞
δ(t)dt = 1 (13)
Physical Interpretation A spike of infinite amplitude and zero duration,
having a unit area [2].
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 12 / 120
Impulse functions and Time Shift Property II
Definition
Figure: Plot of an Impulse Function
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 13 / 120
Time Shift Property-Continuous Domain I
1 The impulse function has got a time shift property (wrt integration)
given by [2][4],
∞
−∞
f (t)δ(t) = f (0) (14)
provided that the function remain continuous at t = 0
2 In general, this notion could be generalized to,
∞
−∞
f (t)δ(t − t0) = f (t0) (15)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 14 / 120
Time Shift Property-Discrete Domain I
The unit discrete impulse function, serves the same purpose as its
continuous counterpart [2]. Mathematically,
δ(x) =
1, if x = 0,
0, if x = 0.
(16)
As such, the time shift properties become,
x=∞
x=−∞
f (x)δ(x) = f (0) (17)
x=∞
x=−∞
f (x)δ(x − x0) = f (x0) (18)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 15 / 120
Need for Fourier Transform[8][9] I
Figure: Different Types of Fourier Transforms. Source: Digital Image Processing
Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI
1 Inverse transform is loss-less
2 Widespread use since the advent of digital computers and Fast
Fourier Transform
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 16 / 120
Fourier Transform[8][9][10] I
Definition
The Fourier Transform of a continuous function f(t) of a continuous
variable t denoted by
F{f (t)} =
∞
−∞
f (t) e−j2πµt
dt (19)
where µ is also a continuous variable
Thus,
F{f (t)} = F(µ) (20)
F(µ) =
∞
−∞
f (t) e−j2πµt
dt (21)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 17 / 120
Fourier Transform I
Definition
Using Euler’s Formula,
F(µ) =
∞
−∞
f (t)[cos(2πµt) − jsin(2πµt)]dt (22)
Inverse Fourier Transform
f (t) =
∞
−∞
F(µ)ej2πµt
dµ (23)
Together, F(µ) and f (t) are known as Fourier Transform pairs
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 18 / 120
Fourier Transform I
Note: The Fourier Transform is an expansion of f(t) multiplied by
sinusoidal terms whose frequencies are determined by µ.
Question
Why is the domain of Fourier Transform ’frequency’?
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 19 / 120
Fourier Spectrum I
Need and Definition
Fourier transform contains complex terms. So, we usually deal with
magnitude part
Mathematically, the Fourier Spectrum or the Frequency Spectrum is given
by,
|F(µ)| = |
∞
−∞
f (t)[cos(2πµt) − jsin(2πµt)]dt | (24)
Question
What is the physical significance of frequency spectrum?
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 20 / 120
Questions I
Find out the Fourier Transform of the following signals
f (t) = e−a|t|
(25)
f (t) = δ(t − t0) (26)
Figure: A simple signal in time domain
Also plot the obtained Fourier Transform
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 21 / 120
Convolution I
Definition
1 Flip, multiply and then add.
2 Denoted by a operator.
3 Mathematically, the convolution of two functions f (t) and h(t) of one
continuous variable ’t’ is given by
f (t) h(t) =
∞
−∞
f (τ)h(t − τ) dτ (27)
4 Flip by - sign
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 22 / 120
Convolution I
Fourier Transform of Convolution operation[2]
F{f (t) h(t)} =
∞
−∞
∞
−∞
f (τ)h(t − τ)dτ e−2jπµt
dt (28)
In other words,
F{f (t) h(t)} =
∞
−∞
f (τ)
∞
−∞
h(t − τ)e−2jπµt
dt dτ (29)
=
∞
−∞
f (τ) H(µ)e−2πjµτ
dτ (30)
= H(µ)
∞
−∞
f (τ)e−j2πµτ
dτ (31)
= H(µ)F(µ) (32)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 23 / 120
Convolution I
Consequence-Convolution Theorem[2]
1 First half of convolution theorem
f (t) h(t) ⇐⇒ F(µ)H(µ) (33)
2 Interchangeability of domains
spatial domain(t) ⇐⇒ frequency domain(µ) (34)
3 Another half
f (t)h(t) ⇐⇒ H(µ) F(µ) (35)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 24 / 120
Properties of Fourier Transform[10] I
Assuming that
f (t) ⇐⇒ F(µ) (36)
We have the following properties for the Fourier Transform
Translation
f (t − t0) ⇐⇒ e−jµt0
F(µ) (37)
Modulation
ejµ0t
f (t) ⇐⇒ F(µ − µ0) (38)
Scaling
f (at) ⇐⇒
1
|a|
F
µ
a
(39)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 25 / 120
Properties of Fourier Transform I
Duality
F(t) ⇐⇒ 2πf (−µ) (40)
Multiplication
f1(t)f2(t) ⇐⇒
1
2π
F1(µ) F2(µ)] (41)
Differentiation in Time
df (t)
dt
⇐⇒ jµ F(µ) (42)
Differentiation in Frequency
(−jt)n
f (t) ⇐⇒
dnF(µ)
dµ
(43)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 26 / 120
Sampling and Fourier Transform of Sampled signals I
Sampling
Continuous signals into discrete signals
Sampled values then quantized
Mathematically,
f ˜
(t) = f (t)s∆T (t) =
∞
n=−∞
f (t)δ(t − n∆T) (44)
Each component of this summation is an impulse weighted by the
value of f(t) at the location of the impulse
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 27 / 120
Sampling and the Fourier Transform of Sampled signals I
Sampling
The value of each sample is given by the strength of the weigted impulse,
which we obtain by integration.
Mathematically,
fk =
∞
−∞
f (t)δ(t − k∆T) dt (45)
= f (k∆T) (46)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 28 / 120
Fourier Transform of Sampled Function I
The Fourier Transform F˜(µ) of the sampled function f ˜(t) is
F˜
(µ) = F{f ˜
(t)} (47)
= F{f (t)s∆T (t)} (48)
= F(µ) S(µ) (49)
where,
S(µ) =
1
∆T
∞
n=−∞
δ µ −
n
∆T
(50)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 29 / 120
The Fourier Transform of Sampled Signal I
Using
F˜
(µ) = F(µ) S(µ) (51)
we have
F˜
(µ) =
∞
−∞
F(τ)S(µ − τ) dτ (52)
=
1
∆T
∞
−∞
F(τ)
∞
n=−∞
δ µ − τ −
n
∆T
dτ (53)
=
1
∆T
∞
n=−∞
F µ −
n
∆T
(54)
Thus, Fourier Transform F˜(µ) of the sampled signal f ˜(t) is an infinite,
periodic sequence of copies of F(µ), the transform of the original,
continuous signal
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 30 / 120
The Fourier Transform of the Sampled Signals I
From,
F˜
(µ) =
1
∆T
∞
n=−∞
F µ −
n
∆T
(55)
, we have
∆T as the sample duration
The separation between copies is determined by 1
∆T
This separation can determine if F(µ) is preserved in the sum
Accordingly we have oversampling, critical sampling and
under-sampling
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 31 / 120
The Fourier Transform of the Sampled Signal[2] I
Sampling under different conditions
Figure: Transforms of the corresponding sampled function under conditions of
over-sampling, critically-sampling and undersampling. Source: Digital Image
Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 32 / 120
Fourier Transform in two variables I
Definition
The Fourier transform equations can be easily extended to two variables as
F(u, v) =
∞
−∞
∞
−∞
f (x, y)e−j2π(ux+vy)
dx dy (56)
Simlarly, the inverse transform is given by
f (x, y) =
∞
−∞
∞
−∞
F(u, v)ej2π(ux+vy)
du dv (57)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 33 / 120
Discrete Fourier Transform [2] I
Definition
The Fourier Transform of a discrete function of one variable, f [x],
x=0,1,2...M − 1 is given by
F(u) =
1
M
M−1
x=0
f [x]e
−j2πux
M for u = 0, 1, 2, ..., M − 1 (58)
Simiarly, the inverse DFT is given by
f [x] =
M−1
u=0
F(u)e
j2πux
M for x = 0, 1, 2, ..., M − 1 (59)
The DFT remains a discrete quantity with same number of components as
signal.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 34 / 120
Discrete Fourier Transform I
Key points
1 DFT remains a discrete quantity with same number of components as
the signal
2 Same applies for IDFT as well
3 DFT and IDFT always exist (unlike the continuous case)
4 Each summation term called the component of DFT
5 In general, components are complex, Why?
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 35 / 120
Discrete Fourier Transform I
Representation of DFT in Euler form
Usin Euler’s formula, we express F(u) in polar coordinates,
F(u) = |F(u)| e−j φ(u)
(60)
where
|F(u)| = R2
(u) + I2
(u)
1
2
(61)
is the magnitude spectrum of the Fourier transform and
φ(u) = tan−1 I(u)
R(u)
(62)
is the phase angle or the phase spectrum.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 36 / 120
Discrete Fourier Transform I
Representation of DFT in Euler form
Power Spectrum
This is yet another important parameter given by
P(u) = |F(u)|2
(63)
= R2
(u) + I2
(u) (64)
Also referred to as spectral density
What is the physical significance of power spectrum?
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 37 / 120
The Two-dimensional DFT and its Inverse I
Definition of Two-dimensional DFT
Since image is a 2-D signal, we now proceed to Discrete Fourier Transform
in two dimensions.
The Discrete Fourier transform of a function f (x, y) of size M x N is
given by
F(u, v) =
1
MN
M−1
x=0
N−1
y=0
f (x, y) e−j2π( ux
M
+vy
N
)
(65)
for u=0,1,2...M-1 and v=0,1,2,..N-1.
Reminder: x,y are spatial variables while u,v are frequency variables
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 38 / 120
The Two-dimensional DFT and its Inverse I
Definition of Inverse DFT
As is the case of 1-D transform, the inverse DFT for two dimensions is
given by
f (x, y) =
M−1
u=0
N−1
v=0
F(u, v) ej2π( ux
M
+vy
N
)
(66)
for x=0,1,2...M-1 and y=0,1,2,....N-1
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 39 / 120
The Two-dimensional DFT and its Inverse I
Representation of 2-D DFT in Euler form
Fourier Spectrum
|F(u, v)| = R2
(u, v) + I2
(u, v)
1
2
(67)
Phase Spectrum
φ(u, v) = tan−1 I(u, v)
R(u, v)
(68)
Power Spectrum
P(u, v) = |F(u, v)|2
(69)
= R2
(u, v) + I2
(u, v) (70)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 40 / 120
Properties of Two-dimensional DFT I
Translation Property
f (x, y)e
j2π
u0x
M
+
v0y
N
↔ F(u − u0, v − v0) (71)
Similarly,
f (x − x0, y − y0) ↔ F(u, v) e
−j2π
ux0
M
+
vy0
N
(72)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 41 / 120
Properties of Two-dimensional DFT I
Translation to the center of the frequency rectangle
f (x, y)(−1)x+y
↔ F(u −
M
2
, v −
N
2
) (73)
And,
f (x −
M
2
, y −
N
2
) ↔ F(u, v)(−1)u+v
(74)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 42 / 120
Properties of Two-dimensional DFT I
Convolution Property
f (x, y) h(x, y) ↔ F(u, v)H(u, v) (75)
And,
f (x, y)h(x, y) ↔ F(u, v) H(u, v) (76)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 43 / 120
Properties of Two-dimensional DFT I
Translation to the center of the frequency rectangle
f (x, y)(−1)x+y
↔ F(u −
M
2
, v −
N
2
) (77)
Input image function usually multiplied by (−1)x+y prior to Fourier
Transform[1]. Why?
Origin of frequency rectangle shifts to the center of the frequency
rectangle.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 44 / 120
Properties of Two-dimensional DFT I
The value of the transform at (u,v)=(0,0) is given by
F(0, 0) =
1
MN
M−1
x=0
N−1
y=0
f (x, y) (78)
which is the average value of f(x,y)(also called dc component of the
spectrum).
Corollary If the image is f(x,y), the value of Fourier Transform at the
origin is equal to the average gray level of the image.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 45 / 120
Aliasing[11][2] I
Definition
Occurs when high frequency components ”masquarade” as low frequency
components(called aliased freqencies)
1 A consequence of under-sampling
2 Corrupts the sampled image
3 Additional frequency components are introduced into the sampled
image
4 Moire’s pattern introduced in the images (spatially sampled signal)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 46 / 120
Aliasing I
Moire’s Patterns
Figure: A sine waveform being sampled at frequency less than twice the maximum
frequency. Source:
http: // users. wfu. edu/ matthews/ misc/ DigPhotog/ alias/
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 47 / 120
Aliasing I
(a) Original Image (b) Resized Image (c) Moire’s pattern in
image due to aliasing
Figure: Moire’s pattern in images due to aliasing. Source:
http: // users. wfu. edu/ matthews/ misc/ DigPhotog/ alias/
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 48 / 120
Aliasing I
Moire’s Patterns[2]
Figure: Some more examples of Moire’s pattern. Source: Digital Image
Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 49 / 120
Anti-Aliasing[11] I
1 Attenuate higher frequencies (relative to what?)
2 Needs to be done before sampling since it cannot be undone after the
fact[1].Hence, effective software antialias filters do not exist.
3 Various strategies like notch filters, intentional blurring[6] in front of
CCD etc.
Question: Any alternative to Antialias filter?
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 50 / 120
Basics of Filtering in the frequency domain I
Basic Steps
Filtering takes place in the following steps [1]
1 Multiply the image function by (−1)x+y . Why?
2 Multiply F(u,v) of the image by filter transfer function H(u,v)
3 Compute the inverse DFT of the above product
4 Obtain the real part
5 Multiply the above result by (−1)x+y
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 51 / 120
Basics of Filtering in the frequency domain I
Basic Steps
Figure: Basic steps for filtering in the frequency domain. Source: Digital Image
Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 52 / 120
Image Smoothing using lowpass filter I
Key points
Edges and noises(sharp transitions) in an image contributes
significantly to the high frequency content of its Fourier transform
Smoothing(blurring) achieved by high frequency attenuation
Types of low pass filters to be discussed
1 Ideal Low pass filters
2 ButterWorth filters
3 Gaussian Filters
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 53 / 120
Image Smoothing using lowpass filter I
Ideal Lowpass Filter[2]
A 2-D lowpass filter that passes without attenuation all frequencies within
a radius of D0 and at the same time cuts off all other frequencies
completely. Mathematically, it is defined as
H(u, v) =
1, if D(u, v) ≤ D0,
0, if D(u, v) > D0.
(79)
Here, D(u, v) is the distance between a point (u,v) in the frequency
domain and the center of the frequency rectangle
D(u, v) = u −
P
2
2
+ v −
Q
2
2 1
2
(80)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 54 / 120
Image Smoothing using lowpass filter I
Ideal Lowpass Filter
Figure: (a) Perspective plot of an ideal low pass filter (b) Filter displayed as an
image (c) Filter radial cross section. Source: Digital Image Processing
Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 55 / 120
Image Smoothing using lowpass filter I
Ideal Lowpass Filter
Key Point
1 ILPF is radially symmteric about the origin
2 The point of transition from H(u, v) = 1 to H(u, v) = 0 called cutoff
frequency
3 Ideal behavior cannot be realized by electronics; mathematically
feasible
In order to establish a set of cutoff frequency loci, we compute circles that
enclose specified amounts of total image power PT .
Mathematically
PT =
P−1
u=0
Q−1
v=0
P(u, v) (81)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 56 / 120
Image Smoothing using lowpass filter I
Ideal Lowpass Filter
Figure: (a) and (b) show a test pattern image and its spectrum. The circles
superimposed on the spectrum hve radii of 10, 30, 60, 160 and 460 pixels
respectively. These circles enclose α percent of image power, for
α = 87.0, 93.1, 95.7, 97.8 and 99.2 respectively. The spectrum falls off rapidly,
with 87 % of the total power being enclosed by a relatively small circle of radius
10.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 57 / 120
Image Smoothing using lowpass filter I
Ideal Lowpass Filter
Figure: (b)-(f) Results of filtering using ILPFs with cutoff frequencies set at radii
values 10, 30, 60, 160 and 460. The power removed by these filters was 13, 6.9,
4.3, 2.2 and 0.8 % of the total respectively. Source: Digital Image Processing
Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 58 / 120
Image Smoothing using lowpass filter I
Ideal Lowpass Filter
Severe blurring in (b) means majority of the sharp detail information
in the picture is contained in the 13 percent power removed by the
filter.
With increasing radius, lesser power is removed; hence, less blurring
Ringing gets finer in texture as the amount of high frequency
component removed decreases.
Ringing, a characteristic of less popular ideal filters
Little edge information lost meant less blurring with increasing α
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 59 / 120
Image Smoothing using lowpass filter I
Ideal Lowpass Filter
Figure: (a)Representation in the spatial domain of an ILPF of radius 5 and size
1000 x 1000. (b) Intensity profile of a horizontal line passing through the center
of the image. Source: Digital Image Processing Processing(3rd Edition) by
Gonzalez, R.C. and Woods, R.E, PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 60 / 120
Image Smoothing using lowpass filter I
Ideal Lowpass Filter
Blurring and ringing properties can be explained though convolution
theorem
Cross section of ILPF in spatial domain bound to appear as a sinc
function(why?)
Filtering in the spatial domain by convolving h(x,y) with the image
Each pixel as a discrete impulse with strength proportional to its
intensity
Convolving a sinc function with an impulse simply copies the sinc at
the location of the impulse
Center lobe of the sinc is the principal cause for blurring
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 61 / 120
Image Smoothing using lowpass filter I
Ideal Lowpass Filter
Colvolving a sinc function with every pixel in the image: a nice model
to guess the response of ILPF
Spread of sinc inversely proportional to radius of H(u,v); means for
larger D0, sinc approaches an impulse function
In the extreme case, when sinc becomes an impulse function, no
blurring upon convolution
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 62 / 120
Image Smoothing using lowpass filter I
Butterworth Lowpass Filter[2]
A butterworth low pass filter of order n and with cutoff frequency D0 from
the origin is defined as
H(u, v) =
1
1 + D(u,v)
D0
2n
(82)
Here, the terms D(u, v) and D0 have the usual meaning.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 63 / 120
Image Smoothing using lowpass filter I
Butterworth Lowpass Filter
Figure: (a) Perspective plot of a Butterworth lowpass filter transfer function. (b)
Filter displayed as an image. (c) Filter radial cross sectionsof orders 1 through 4.
Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and
Woods, R.E, PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 64 / 120
Image Smoothing using lowpass filter I
Butterworth Lowpass Filter
Figure: (a) and (b) show a test pattern image and its spectrum. The circles
superimposed on the spectrum hve radii of 10, 30, 60, 160 and 460 pixels
respectively. These circles enclose α percent of image power, for
α = 87.0, 93.1, 95.7, 97.8 and 99.2 respectively. The spectrum falls off rapidly,
with 87 % of the total power being enclosed by a relatively small circle of radius
10.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 65 / 120
Image Smoothing using lowpass filter I
Butterworth Lowpass Filter
Figure: Results of filtering using BLPFs of order (n)=2, with cutoff frequencies at
the radii shown above. Source: Digital Image Processing Processing(3rd Edition)
by Gonzalez, R.C. and Woods, R.E, PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 66 / 120
Image Smoothing using lowpass filter I
Butterworth Lowpass Filter
Figure: Spatial representations of BLPFs of order 1,2,5 and 20, and the
corresponding intensity profiles through the center of the filters (the size in all
cases in 1000 x 1000 and the cutoff frequency is 5). Ringing increases with filter
order
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 67 / 120
Image Smoothing using lowpass filter I
Butterworth Lowpass Filter
Ringing imperceptible in lower orders, significant for higher orders.
For lower orders, the ringing remains less compared to ILPF
Ringing becomes prominent and comparable for orders above 20
Order 2 most popular since it strikes a balance between filtering and
ringing.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 68 / 120
Image Smoothing using lowpass filter I
Gaussian Lowpass Filters[1]
The Gaussian lowpass filter in two dimensions is given by
H(u, v) = e
−D2(u,v)
2D2
0 (83)
Here, the terms D(u, v) and D0 have the usual meaning.
When D(u, v) = D0, the GLPF is down to 0.607 of its maximum value.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 69 / 120
Image Smoothing using lowpass filter I
Gaussian Lowpass Filters[2]
Figure: (a) Perspective plot of a GLPF transfer function. (b) Filter displayed as
an image. (c) Filter radial cross sections for various values of D0. Source: Digital
Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E,
PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 70 / 120
Image Smoothing using lowpass filter I
Gaussian Lowpass Filter
Figure: (a) and (b) show a test pattern image and its spectrum. The circles
superimposed on the spectrum hve radii of 10, 30, 60, 160 and 460 pixels
respectively. These circles enclose α percent of image power, for
α = 87.0, 93.1, 95.7, 97.8 and 99.2 respectively. The spectrum falls off rapidly,
with 87 % of the total power being enclosed by a relatively small circle of radius
10.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 71 / 120
Image Smoothing using lowpass filter I
Gaussian Lowpass Filters
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 72 / 120
Image Smoothing using lowpass filter II
Gaussian Lowpass Filters
Figure: (a) Original Image. (b)-(f) Results of filtering using GLPFs with cutoff
frequencies at the radii show above. Source: Digital Image Processing
Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 73 / 120
Image Smoothing using lowpass filter I
Gaussian Lowpass Filters
The inverse Fourier transform of GLPF is Gaussian[1]
A spatial Gaussian filter obtained by computing the IDFT of H(u,v)
will have no ringing[1]
A smooth transition in blurring as a function of increasing cutoff
frequency obtained
GLPF achieved slightly less smoothing than the BLPF of order 2 for
same cutoff frequency
Assures no ringing[2][3]; However, if a tight control of frequency
transition required, then a BLPF is preferred.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 74 / 120
Sharpening Frequency Domain Filters[2] I
Highpass Filters
1 Edges and other abrupt changes associated with high frequency
components.
2 Sharpening means accentuating these high frequency features
3 Assumptions
Only zero phase shift filters
Filters are radially symmetric
All filter functions assumed to be of the size PxQ
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 75 / 120
Sharpening Frequency Domain Filters I
Ideal Highpass Filters
An ideal HPF is given by
Hhp(u, v) = 1 − Hlp(u, v) (84)
Idea? Fairly Intuitive
When the low pass filter attenuates a particular frequency, highpass filter
simply allows it.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 76 / 120
Sharpening Frequency Domain Filters I
Ideal highpass Filter
Figure: Perspective plot, image representation and cross section of a typical ideal
highpass filter. Source: Digital Image Processing (3rd Edition) by Gonzalez, R.C.
and Woods, R.R.,PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 77 / 120
Sharpening Frequency Domain Filters I
Ideal Highpass Filters
A 2-D highpass filter (IHPF) is defined as
H(u, v) =
0, if D(u, v) ≤ D0,
1, if D(u, v) > D0.
(85)
where D0 is the cutoff distance measured from the origin of the frequency
rectangle.
Question: Why are ideal filters not physically realizable
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 78 / 120
Sharpening Frequency Domain Filters I
Characteristics of Ideal Highpass Filters
Figure: Spatial representation of a typical ideal highpass filter an corresponding
gray level profiles. Source: Digital Image Processing (3rd Edition) by Gonzalez,
R.C. and Woods, R.R.,PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 79 / 120
Sharpening Frequency Domain Filters I
Characteristics of Ideal Highpass filters
1 Same ringing characteristics[12][13]
2 Smaller lines and objects appear almost solid white
3 With increasing D0, edges become much cleaner and less distorted
and smaller objects get filtered properly.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 80 / 120
Sharpening Frequency Domain Filters I
Characteristics of Ideal Highpass Filters
Figure: Results of ideal highpass filtering the image with D0=15,30 and 80
respectively. Ringing[12][2] quite evident in (a) and (b). Source: Digital Image
Processing (3rd Edition) by Gonzalez, R.C. and Woods, R.R.,PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 81 / 120
Sharpening Frequency Domain Filters I
Butterworth Highpass Filters
The transfer function of the Butterworth highpass filter (BHPF) of order n
and with cutoff frequency locus at a distance D0 from the origin is given by
H(u, v) =
1
1 + D0
D(u,v)
2n
(86)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 82 / 120
Sharpening Frequency Domain Filters I
Characteristics of Butterworth Highpass Filters
Figure: Perspective plot, image representation and cross section of a typical
Butterworth highpass filter. Source: Digital Image Processing (3rd Edition) by
Gonzalez, R.C. and Woods, R.R.,PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 83 / 120
Sharpening Frequency Domain Filters I
Characteristics of Butterworth Highpass Filters
Figure: Spatial representation of a typical Butterworth highpass filter an
corresponding gray level profiles. Source: Digital Image Processing (3rd Edition)
by Gonzalez, R.C. and Woods, R.R.,PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 84 / 120
Sharpening Frequency Domain Filters I
Characteristics of Butterworth Highpass Filters
1 Smoother than IHPFs
2 For smaller objects, performance of IHPF and low order BHPF is
almost same
3 Transition into higher cutoff frequencies is much smoother with the
BHPF.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 85 / 120
Sharpening Frequency Domain Filters I
Characteristics of Butterworth Highpass Filters
Figure: Results of highpass filtering the image using a BHPF or order 2 with
D0=15, 30 and 80 respectively. The results are much smoother than those
obtained with an ILPF. Source: Digital Image Processing (3rd Edition) by
Gonzalez, R.C. and Woods, R.R.,PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 86 / 120
Sharpening Frequency Domain Filters I
Gaussian Highpass Filters
The transfer function of the Gaussian Highpass filter (GHPF) with cutoff
frequency locus at a distance D0 from the origin is given by
H(u, v) = 1 − e
−D2(u,v)
2D2
0 (87)
Results are thus much smoother compared to Butterworth filter.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 87 / 120
Sharpening Frequency Domain Filters I
Characteristics of Gaussian Highpass Filters
Figure: Perspective plot, image representation and cross section of a typical
Gaussian highpass filter. Source: Digital Image Processing (3rd Edition) by
Gonzalez, R.C. and Woods, R.R.,PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 88 / 120
Sharpening Frequency Domain Filters I
Characteristics of Gaussian Highpass Filters
Figure: Spatial representation of a typical Gaussian highpass filter an
corresponding gray level profiles. Source: Digital Image Processing (3rd Edition)
by Gonzalez, R.C. and Woods, R.R.,PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 89 / 120
Sharpening Frequency Domain Filters I
Characteristics of Highpass Filters
Figure: Results of highpass filtering the image using a GHPF of order 2 with
D0=15,30 and 80 respectively.Source: Digital Image Processing (3rd Edition) by
Gonzalez, R.C. and Woods, R.R.,PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 90 / 120
Unsharp Masking and Highboost Filtering in Spatial
Domain I
Introduction[2]
1 For sharpening the images
2 Idea is to substract an unsharped version of the image from the
original image
3 Process called unsharp masking
4 In printing and publishing industry
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 91 / 120
Unsharp masking and Highboost Filtering in Spatial
Domain I
Basic steps
The process of unsharp masking involves
Blur the image (using a lowpass filter). Denote it by f −(x, y)
Subtract the blurred image from the original (this difference called the
mask)
gmask(x, y) = f (x, y) − f (x, y) (88)
Add the weighted portion of mask to the original
g(x, y) = f (x, y) + k ∗ gmask(x, y) (89)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 92 / 120
Unsharp Masking and Highboost Filtering in Spatial
Domain I
Summary
From,
g(x, y) = f (x, y) + k ∗ gmask(x, y) (90)
The parameter k is used for generality.
1 When k = 1, we have unsharp masking
2 When k > 1 we have highboost filtering
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 93 / 120
Unsharp Masking and HIghboost Filtering in Spatial
Domain I
Illustration
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 94 / 120
Unsharp Masking and HIghboost Filtering in Spatial
Domain II
Illustration
Figure: 1-D illustration of the mechanics of unsharp masking. (a) Original Signal.
(b) Blurred signal with original shown dashed for reference. (c) Unsharp Mask.
(d)Sharpened signal obtained by by adding (c) to (a). Source: Digital Image
Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 95 / 120
Unsharp Masking and Highboost Filtering in Frequency
Domain I
Introduction
From the discussion wrt to spatial domain, we have
gmask(x, y) = f (x, y) − fLP(x, y) (91)
where
fLP(x, y) = f −1
HLP(u, v)F(u, v) (92)
Thus, the modified image could be written as
g(x, y) = f (x, y) + k ∗ gmask(x, y) (93)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 96 / 120
Unsharp Masking and Highboost Filtering in Spatial
Domain I
Derivation
Continuing from the above discussion, we have
g(x, y) = F−1
[1 + k ∗ [1 − HLP(u, v)]]F(u, v) (94)
Expressing the same results in terms of a highpass filter, we have
g(x, y) = F−1
[1 + k ∗ HHP(u, v)]F(u, v) (95)
The term in the square brackets better known as high frequency emphasis
filter. The HPFs set the dc term to 0 but not in this case.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 97 / 120
Homomorphic Filtering[2] I
Introduction
1 Uses illumination-reflectance model to improve the appearance of the
image
2 Common procedures include simultaneous intensity rane compression
and contrast enhancement
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 98 / 120
Homomorphic Filtering I
Background
From the illumination-reflectance model, an image f (x, y) can be
expressed as the product of illumination and reflectance terms.
Mathematically,
f (x, y) = i(x, y)r(x, y) (96)
However, the same cannot be subsituted with the frequency counterparts.
Why?
Solution: Go for the log
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 99 / 120
Homomorphic Filtering I
Background
We define,
z(x, y) = lnf (x, y) (97)
= lni(x, y) + lnr(x, y) (98)
Then,
F(z(x, y)) = F(lni(x, y)) + F(lnr(x, y)) (99)
Equivalently,
Z(u, v) = Fi (u, v) + Fr (u, v) (100)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 100 / 120
Homomorphic Filtering I
Filtering
With the above transformation, we can filter Z(u, v) using a filter H(u, v)
so that the output is
S(u, v) = H(u, v)Z(u, v) (101)
= H(u, v)Fi (u, v) + H(u, v)Fr (u, v) (102)
The filtered image in the spatial domain will then be
s(x, y) = F−1
S(u, v) (103)
= F−1
H(u, v)Fi (u, v) + F−1
H(u, v)Fr (u, v) (104)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 101 / 120
Homomorphic Filtering I
Filtering
By defining,
i (x, y) = F−1
H(u, v)Fi (u, v) (105)
and
r (x, y) = F−1
H(u, v)Fr (x, y) (106)
we have
s(x, y) = i (x, y) + r (x, y) (107)
Also, by reversing the logarithm, the filtered image obtained could be
g(x, y) = es(x,y)
(108)
= ei (x,y)
er (x,y)
(109)
i0(x, y)r0(x, y) (110)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 102 / 120
Homomorphic Filtering I
Filtering
The basic steps of homomorphic filtering could be represented as
Figure: Summary of steps in homomorphic filtering. Source: Digital Image
Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 103 / 120
Homomorphic Filtering I
Filtering
1 Applicable for homomorphic systems
2 The illumination and refectance components could be separated
3 The filter then operates on individual components
Note: Illumination components associated with slow spatial variations
while reflectance components are usually associated with abrupt spatial
variations.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 104 / 120
Homomorphic Filtering I
Filtering
The above constraints are taken care by homomorphic filters. In other
words, a homomorphic filter controls the illumination and reflectance
components.
The net result is simultaneous dynamic range compression and contrast
enhancement
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 105 / 120
Periodic Noise Reduction by Frequency Domain Filtering I
Introduction
1 Freuqency domain analysis suited to noise analysis
2 Periodic noise: Burst of noise in FT
3 Selective filters to isolate noise
4 Common filters used are bandreject, bandpass and notch filters
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 106 / 120
Periodic Noise Reduction by Frequency Domain Filtering[2]
I
Bandreject Filters
1 for noise removal when the location of noise components known
2 Example: an image corrupted by additive periodic noise that can be
approximated as two-dimensional sinusoids
3 Because FT of sine consists of two imaginary impulses mirrored about
origin. Imaginary, hence, complex conjugates to one another
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 107 / 120
Periodic Noise Reduction by Frequency Domain Filtering I
Bandreject Filters
Figure: From left to right, perspective plots of ideal, Butterworth (of order 1),
and Gaussian bandreject filters. Source: Digital Image Processing Processing(3rd
Edition) by Gonzalez, R.C. and Woods, R.E, PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 108 / 120
Periodic Noise Reduction by Frequency Domain Filtering I
Bandreject Filters
Figure: (a) Image corrupted by the sinusoid noise. (b) Spectrum of (a). (c)
Butterworth bandreject filter (white represents 1). (d) Results of filtering.
(Original image courtsey of NASA)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 109 / 120
Periodic Noise Reduction by Frequency Domain Filtering I
Bandreject Filters
1 image corrupted by sinusoids
2 Noise components can be seen as symmetric dots in the FT (in this
case, on a circle)
3 Butterworth bandreject filter of order 4
4 Radius appropriate to enclose completely the noise impluses
5 Small details and textures restored successfully
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 110 / 120
Periodic Noise Reduction by Frequency Domain Filtering I
Bandpass Filters
1 Opposite to bandreject filter
HBP(u, v) = 1 − HBR(u, v) (111)
2 Can sometimes remove too much image details.
3 Useful in isolating the effects on an image by frequency bands.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 111 / 120
Periodic Noise Reduction by Frequency Domain Filtering I
Bandpass Filters
Figure: Noise pattern of the image obtained by bandpass filtering. Source: Digital
Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E,
PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 112 / 120
Periodic Noise Reduction by Frequency Domain Filtering I
Bandpass Filters
1 Most image details lost
2 Noise patterns recovered accurately
3 Thus, bandpass filtering helps isolate the noise patterns.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 113 / 120
Periodic Noise Reduction by Frequency Domain Filtering I
Notch Filter
1 Rejects (or passes) frequencies in predefined neighbourhoods about a
certain frequency
2 Notch filters appear in symmetric pairs about the origin
3 Usually, they are used to pass the frequencies in the notch area
4 Mathematically, notchpass and notchreject filters are related as
HNP(u, v) = 1 − HNR(u, v) (112)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 114 / 120
Periodic Noise Reduction by Frequency Domain Filtering I
Notch filters
Figure: Perspective plots of (a) ideal, (b)Butterworth (order 2), (c) Gaussian
notch filters. Source: Digital Image Processing Processing(3rd Edition) by
Gonzalez, R.C. and Woods, R.E, PHI
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 115 / 120
Inverse Filtering[2] I
Introduction
1 First step towards image restoration
2 We assume the degrading function to be H
3 Here, we an estimate of the transform simply by dividing the
transform of the degraded image G(u, v), by the degradation function
ˆF(u, v) =
G(u, v)
H(u, v)
(113)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 116 / 120
Inverse Filtering I
Introduction
The previous equation can also be written as
ˆF(u, v) = F(u, v) +
N(u, v)
H(u, v)
(114)
In the above equation, N(u, v) is unknown.
Consequence: Even if we know the degraation function, we cannot recover
the undegraded image.
To add to this, if H(u, v) is small, then it cannot virtually dominate the
value of ˆF(u, v)
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 117 / 120
Inverse Filtering I
Introduction
Possible Solution
Limit the filter frequencies near the origin since H(0, 0) is highest near the
origin.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 118 / 120
References I
1 http://nptel.ac.in/courses/111103021/15
2 Digital Image Processing (3rd Edition) by Gonzalez, R.C. and Woods,
R.R.,PHI
3 http://web.stanford.edu/class/ee104/lecture4.pdf
4 Digital Image Processing (3rd Edition) by Willian k. Pratt, John
Wiley and Sons
5 MIT OpenCourseWare
http://math.mit.edu/~gs/cse/websections/cse41.pdf
6 https://en.wikipedia.org/wiki/Dirichlet_conditions
7 Web Tutorialshttps://6002x.mitx.mit.edu/
8 Stanford University Text
web.stanford.edu/class/ee102/lectures/fourtran
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 119 / 120
References II
9 Nptel Tutorials(IIT Madras)
http://nptel.ac.in/courses/IIT-MADRAS/Principles_Of_
Communication/pdf/Lecture05_FTProperties.pdf
10 Princeton University Courseware https://www.princeton.edu/
~cuff/ele201/kulkarni_text/frequency.pdf
11 Web Tutorials
http://users.wfu.edu/matthews/misc/DigPhotog/alias/
12 Web Resources imaging.cs.msu.ru/en/research/ringing
13 M. Khambete and M. Joshi, ”Blur and Ringing Artifact Measurement
in Image Compression using Wavelet Transform ”, World Academy of
Science, Engineering and Technology , 2007.
Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 120 / 120

Weitere ähnliche Inhalte

Was ist angesagt?

Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restorationMd Shabir Alam
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial DomainA B Shinde
 
Color image processing Presentation
Color image processing PresentationColor image processing Presentation
Color image processing PresentationRevanth Chimmani
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and SegmentationA B Shinde
 
Spatial filtering using image processing
Spatial filtering using image processingSpatial filtering using image processing
Spatial filtering using image processingAnuj Arora
 
Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Moe Moe Myint
 
Image Restoration
Image RestorationImage Restoration
Image RestorationPoonam Seth
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentationasodariyabhavesh
 
Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)Kalyan Acharjya
 
Image processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersImage processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersKuppusamy P
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial DomainDEEPASHRI HK
 
Image Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsImage Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsKalyan Acharjya
 
Image Segmentation (Digital Image Processing)
Image Segmentation (Digital Image Processing)Image Segmentation (Digital Image Processing)
Image Segmentation (Digital Image Processing)VARUN KUMAR
 
Digital Image Processing: Image Restoration
Digital Image Processing: Image RestorationDigital Image Processing: Image Restoration
Digital Image Processing: Image RestorationMostafa G. M. Mostafa
 
Smoothing in Digital Image Processing
Smoothing in Digital Image ProcessingSmoothing in Digital Image Processing
Smoothing in Digital Image ProcessingPallavi Agarwal
 

Was ist angesagt? (20)

Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restoration
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Color image processing Presentation
Color image processing PresentationColor image processing Presentation
Color image processing Presentation
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
 
image enhancement
 image enhancement image enhancement
image enhancement
 
Spatial filtering using image processing
Spatial filtering using image processingSpatial filtering using image processing
Spatial filtering using image processing
 
Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)Lecture 1 for Digital Image Processing (2nd Edition)
Lecture 1 for Digital Image Processing (2nd Edition)
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)Spatial Filters (Digital Image Processing)
Spatial Filters (Digital Image Processing)
 
Image processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersImage processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filters
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Image segmentation
Image segmentation Image segmentation
Image segmentation
 
Chap6 image restoration
Chap6 image restorationChap6 image restoration
Chap6 image restoration
 
Image Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsImage Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):Basics
 
Image compression .
Image compression .Image compression .
Image compression .
 
Image Segmentation (Digital Image Processing)
Image Segmentation (Digital Image Processing)Image Segmentation (Digital Image Processing)
Image Segmentation (Digital Image Processing)
 
Digital Image Processing: Image Restoration
Digital Image Processing: Image RestorationDigital Image Processing: Image Restoration
Digital Image Processing: Image Restoration
 
Smoothing in Digital Image Processing
Smoothing in Digital Image ProcessingSmoothing in Digital Image Processing
Smoothing in Digital Image Processing
 
Noise
NoiseNoise
Noise
 

Ähnlich wie Frequency Domain Filtering of Digital Images

Digital Signal Processing[ECEG-3171]-Ch1_L04
Digital Signal Processing[ECEG-3171]-Ch1_L04Digital Signal Processing[ECEG-3171]-Ch1_L04
Digital Signal Processing[ECEG-3171]-Ch1_L04Rediet Moges
 
DSP, Differences between Fourier series ,Fourier Transform and Z transform
DSP, Differences between  Fourier series ,Fourier Transform and Z transform DSP, Differences between  Fourier series ,Fourier Transform and Z transform
DSP, Differences between Fourier series ,Fourier Transform and Z transform Naresh Biloniya
 
Digital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysisDigital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysisChandrashekhar Padole
 
Lecture8 Signal and Systems
Lecture8 Signal and SystemsLecture8 Signal and Systems
Lecture8 Signal and Systemsbabak danyal
 
Stein's method for functional Poisson approximation
Stein's method for functional Poisson approximationStein's method for functional Poisson approximation
Stein's method for functional Poisson approximationLaurent Decreusefond
 
Lecture 13 (Usage of Fourier transform in image processing)
Lecture 13 (Usage of Fourier transform in image processing)Lecture 13 (Usage of Fourier transform in image processing)
Lecture 13 (Usage of Fourier transform in image processing)VARUN KUMAR
 
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
DIGITAL IMAGE PROCESSING - Day 4 Image TransformDIGITAL IMAGE PROCESSING - Day 4 Image Transform
DIGITAL IMAGE PROCESSING - Day 4 Image Transformvijayanand Kandaswamy
 
Eece 301 note set 14 fourier transform
Eece 301 note set 14 fourier transformEece 301 note set 14 fourier transform
Eece 301 note set 14 fourier transformSandilya Sridhara
 
Digital Signal Processing Tutorial:Chapt 1 signal and systems
Digital Signal Processing Tutorial:Chapt 1 signal and systemsDigital Signal Processing Tutorial:Chapt 1 signal and systems
Digital Signal Processing Tutorial:Chapt 1 signal and systemsChandrashekhar Padole
 
3. convolution fourier
3. convolution fourier3. convolution fourier
3. convolution fourierskysunilyadav
 
The method of comparing two audio files
The method of comparing two audio filesThe method of comparing two audio files
The method of comparing two audio filesMinh Anh Nguyen
 
Characterization of the Wireless Channel
Characterization of the Wireless ChannelCharacterization of the Wireless Channel
Characterization of the Wireless ChannelSuraj Katwal
 
The method of comparing two audio files
The method of comparing two audio filesThe method of comparing two audio files
The method of comparing two audio filesMinh Anh Nguyen
 

Ähnlich wie Frequency Domain Filtering of Digital Images (20)

Digital Signal Processing[ECEG-3171]-Ch1_L04
Digital Signal Processing[ECEG-3171]-Ch1_L04Digital Signal Processing[ECEG-3171]-Ch1_L04
Digital Signal Processing[ECEG-3171]-Ch1_L04
 
DSP, Differences between Fourier series ,Fourier Transform and Z transform
DSP, Differences between  Fourier series ,Fourier Transform and Z transform DSP, Differences between  Fourier series ,Fourier Transform and Z transform
DSP, Differences between Fourier series ,Fourier Transform and Z transform
 
Digital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysisDigital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysis
 
SDEE: Lectures 3 and 4
SDEE: Lectures 3 and 4SDEE: Lectures 3 and 4
SDEE: Lectures 3 and 4
 
Lecture8 Signal and Systems
Lecture8 Signal and SystemsLecture8 Signal and Systems
Lecture8 Signal and Systems
 
Ss 2013 midterm
Ss 2013 midtermSs 2013 midterm
Ss 2013 midterm
 
Ss 2013 midterm
Ss 2013 midtermSs 2013 midterm
Ss 2013 midterm
 
CVD020 - Lecture Week 2
CVD020 - Lecture Week 2CVD020 - Lecture Week 2
CVD020 - Lecture Week 2
 
Stein's method for functional Poisson approximation
Stein's method for functional Poisson approximationStein's method for functional Poisson approximation
Stein's method for functional Poisson approximation
 
Lecture 13 (Usage of Fourier transform in image processing)
Lecture 13 (Usage of Fourier transform in image processing)Lecture 13 (Usage of Fourier transform in image processing)
Lecture 13 (Usage of Fourier transform in image processing)
 
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
DIGITAL IMAGE PROCESSING - Day 4 Image TransformDIGITAL IMAGE PROCESSING - Day 4 Image Transform
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
 
Eece 301 note set 14 fourier transform
Eece 301 note set 14 fourier transformEece 301 note set 14 fourier transform
Eece 301 note set 14 fourier transform
 
Digital Signal Processing Tutorial:Chapt 1 signal and systems
Digital Signal Processing Tutorial:Chapt 1 signal and systemsDigital Signal Processing Tutorial:Chapt 1 signal and systems
Digital Signal Processing Tutorial:Chapt 1 signal and systems
 
3. convolution fourier
3. convolution fourier3. convolution fourier
3. convolution fourier
 
The method of comparing two audio files
The method of comparing two audio filesThe method of comparing two audio files
The method of comparing two audio files
 
Characterization of the Wireless Channel
Characterization of the Wireless ChannelCharacterization of the Wireless Channel
Characterization of the Wireless Channel
 
8169399.ppt
8169399.ppt8169399.ppt
8169399.ppt
 
The method of comparing two audio files
The method of comparing two audio filesThe method of comparing two audio files
The method of comparing two audio files
 
4. cft
4. cft4. cft
4. cft
 
meee.docx
meee.docxmeee.docx
meee.docx
 

Kürzlich hochgeladen

Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Sumanth A
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfDrew Moseley
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solidnamansinghjarodiya
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfManish Kumar
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionSneha Padhiar
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书rnrncn29
 
OOP concepts -in-Python programming language
OOP concepts -in-Python programming languageOOP concepts -in-Python programming language
OOP concepts -in-Python programming languageSmritiSharma901052
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.elesangwon
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptxmohitesoham12
 
Levelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodLevelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodManicka Mamallan Andavar
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfBalamuruganV28
 
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESCME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESkarthi keyan
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdfHafizMudaserAhmad
 

Kürzlich hochgeladen (20)

Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdf
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solid
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
 
OOP concepts -in-Python programming language
OOP concepts -in-Python programming languageOOP concepts -in-Python programming language
OOP concepts -in-Python programming language
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptx
 
Levelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodLevelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument method
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdf
 
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESCME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
 

Frequency Domain Filtering of Digital Images

  • 1. Filtering in Frequency Domain Upendra Indian Institute of Information Technology, Allahabad Image and Video Processing February 26, 2017 Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 1 / 120
  • 2. Background I Time Domain and Frequency Domain Analysis Time Domain Analysis 1 Applications: predictions, fitting regression models etc[7]. 2 Different types of equipments in each field Frequency Domain Analysis 1 Motivation: conversion of complex differentials into polynomial equations 2 Inverse transform feasible (take care of rules though) 3 Different transforms like Fourier, Laplace, Z etc. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 2 / 120
  • 3. Periodic Signals I 1 A signal f (t) that satisfies f (t) = f (t + T) ∀t ⊆ (1) 2 In general, f (t) = f (t ± T) = f (t ± 2T) = ... = f (t ± nT) (2) 3 T fixed called period 4 Smallest value of T called Principal Period 5 Principal period Vs Period ? Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 3 / 120
  • 4. Background I 1 Proposed by French mathematician Jean Baptise Joseph Fourier [2] 2 Any periodic signal = sum of sines and/or cosines terms of different frequencies. 3 Each term multiplied by a coefficient 4 Coefficients value determines the term’s contribution [3]. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 4 / 120
  • 5. Dirichlet Conditions I 1 Named after Peter Gustav Lejeune Dirichlet [6]. 2 Provides sufficient conditions for a real valued signal to be equal to its fourier series sum 3 Conditions are Signal must be absolutely integrable over a period Finite number of extrema points in any given interval Finite number of discontinuities in any given interval 4 Such a function is said to have a bounded variation over a period [6] Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 5 / 120
  • 6. Definition I Fourier Series [2][3][5] A signal f(t) of a continuous variable ’t’ that is periodic with period ’T’, can be expressed as f (t) = ∞ n=−∞ cn ej 2πn T t (3) where cn = T 2 −T 2 f (t) e−j 2πn T t for n = 0, ±1, ±2.... (4) are the coefficients. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 6 / 120
  • 7. Background I Characteristics of Fourier Series Representation [2] 1 Holds good for all functions (complication immaterial) 2 The original function can be reconstructed completely; hence, a lossless transformation[1][2] 3 Flexibility in terms of domain switch 4 Industries and Academic institutions alike Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 7 / 120
  • 8. Problem-01 I Find the Fourier Series Coefficients of the following signal: Figure: Calculation of Fourier Series Coefficients for the above signal Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 8 / 120
  • 9. Problem-02 I Find the Fourier Series Coefficients of the following signal: Figure: Calculation of Fourier Series Coefficients for the above signal Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 9 / 120
  • 10. Properties of Fourier Series [1][2][3] I Assuming x(t) ⇐⇒ {cn} ; y(t) ⇐⇒ {dn} (5) Linearity Ax(t) + By(t) ⇐⇒ {Acn + Bdn} (6) Multiplication x(t)y(t) ⇐⇒ { ∞ k=−∞ ckdn−k} (7) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 10 / 120
  • 11. Properties of Fourier Series I Time Shifting x(t − t0) ⇐⇒ {e −j2πnt0 T cn} (8) Time Reversal x(−t) ⇐⇒ {c−n} (9) Conjugation x∗ (t) ⇐⇒ {c∗ −n} (10) Time Scaling property x(at) ⇐⇒ ∞ n=−∞ cne j2πn(at) T (11) Time scaling, thus, changes the frequency components [3]. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 11 / 120
  • 12. Impulse functions and Time Shift Property I Definition δ(t) = 1, if t = 0, 0, if t = 0. (12) Subjected to, ∞ −∞ δ(t)dt = 1 (13) Physical Interpretation A spike of infinite amplitude and zero duration, having a unit area [2]. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 12 / 120
  • 13. Impulse functions and Time Shift Property II Definition Figure: Plot of an Impulse Function Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 13 / 120
  • 14. Time Shift Property-Continuous Domain I 1 The impulse function has got a time shift property (wrt integration) given by [2][4], ∞ −∞ f (t)δ(t) = f (0) (14) provided that the function remain continuous at t = 0 2 In general, this notion could be generalized to, ∞ −∞ f (t)δ(t − t0) = f (t0) (15) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 14 / 120
  • 15. Time Shift Property-Discrete Domain I The unit discrete impulse function, serves the same purpose as its continuous counterpart [2]. Mathematically, δ(x) = 1, if x = 0, 0, if x = 0. (16) As such, the time shift properties become, x=∞ x=−∞ f (x)δ(x) = f (0) (17) x=∞ x=−∞ f (x)δ(x − x0) = f (x0) (18) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 15 / 120
  • 16. Need for Fourier Transform[8][9] I Figure: Different Types of Fourier Transforms. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI 1 Inverse transform is loss-less 2 Widespread use since the advent of digital computers and Fast Fourier Transform Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 16 / 120
  • 17. Fourier Transform[8][9][10] I Definition The Fourier Transform of a continuous function f(t) of a continuous variable t denoted by F{f (t)} = ∞ −∞ f (t) e−j2πµt dt (19) where µ is also a continuous variable Thus, F{f (t)} = F(µ) (20) F(µ) = ∞ −∞ f (t) e−j2πµt dt (21) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 17 / 120
  • 18. Fourier Transform I Definition Using Euler’s Formula, F(µ) = ∞ −∞ f (t)[cos(2πµt) − jsin(2πµt)]dt (22) Inverse Fourier Transform f (t) = ∞ −∞ F(µ)ej2πµt dµ (23) Together, F(µ) and f (t) are known as Fourier Transform pairs Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 18 / 120
  • 19. Fourier Transform I Note: The Fourier Transform is an expansion of f(t) multiplied by sinusoidal terms whose frequencies are determined by µ. Question Why is the domain of Fourier Transform ’frequency’? Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 19 / 120
  • 20. Fourier Spectrum I Need and Definition Fourier transform contains complex terms. So, we usually deal with magnitude part Mathematically, the Fourier Spectrum or the Frequency Spectrum is given by, |F(µ)| = | ∞ −∞ f (t)[cos(2πµt) − jsin(2πµt)]dt | (24) Question What is the physical significance of frequency spectrum? Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 20 / 120
  • 21. Questions I Find out the Fourier Transform of the following signals f (t) = e−a|t| (25) f (t) = δ(t − t0) (26) Figure: A simple signal in time domain Also plot the obtained Fourier Transform Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 21 / 120
  • 22. Convolution I Definition 1 Flip, multiply and then add. 2 Denoted by a operator. 3 Mathematically, the convolution of two functions f (t) and h(t) of one continuous variable ’t’ is given by f (t) h(t) = ∞ −∞ f (τ)h(t − τ) dτ (27) 4 Flip by - sign Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 22 / 120
  • 23. Convolution I Fourier Transform of Convolution operation[2] F{f (t) h(t)} = ∞ −∞ ∞ −∞ f (τ)h(t − τ)dτ e−2jπµt dt (28) In other words, F{f (t) h(t)} = ∞ −∞ f (τ) ∞ −∞ h(t − τ)e−2jπµt dt dτ (29) = ∞ −∞ f (τ) H(µ)e−2πjµτ dτ (30) = H(µ) ∞ −∞ f (τ)e−j2πµτ dτ (31) = H(µ)F(µ) (32) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 23 / 120
  • 24. Convolution I Consequence-Convolution Theorem[2] 1 First half of convolution theorem f (t) h(t) ⇐⇒ F(µ)H(µ) (33) 2 Interchangeability of domains spatial domain(t) ⇐⇒ frequency domain(µ) (34) 3 Another half f (t)h(t) ⇐⇒ H(µ) F(µ) (35) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 24 / 120
  • 25. Properties of Fourier Transform[10] I Assuming that f (t) ⇐⇒ F(µ) (36) We have the following properties for the Fourier Transform Translation f (t − t0) ⇐⇒ e−jµt0 F(µ) (37) Modulation ejµ0t f (t) ⇐⇒ F(µ − µ0) (38) Scaling f (at) ⇐⇒ 1 |a| F µ a (39) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 25 / 120
  • 26. Properties of Fourier Transform I Duality F(t) ⇐⇒ 2πf (−µ) (40) Multiplication f1(t)f2(t) ⇐⇒ 1 2π F1(µ) F2(µ)] (41) Differentiation in Time df (t) dt ⇐⇒ jµ F(µ) (42) Differentiation in Frequency (−jt)n f (t) ⇐⇒ dnF(µ) dµ (43) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 26 / 120
  • 27. Sampling and Fourier Transform of Sampled signals I Sampling Continuous signals into discrete signals Sampled values then quantized Mathematically, f ˜ (t) = f (t)s∆T (t) = ∞ n=−∞ f (t)δ(t − n∆T) (44) Each component of this summation is an impulse weighted by the value of f(t) at the location of the impulse Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 27 / 120
  • 28. Sampling and the Fourier Transform of Sampled signals I Sampling The value of each sample is given by the strength of the weigted impulse, which we obtain by integration. Mathematically, fk = ∞ −∞ f (t)δ(t − k∆T) dt (45) = f (k∆T) (46) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 28 / 120
  • 29. Fourier Transform of Sampled Function I The Fourier Transform F˜(µ) of the sampled function f ˜(t) is F˜ (µ) = F{f ˜ (t)} (47) = F{f (t)s∆T (t)} (48) = F(µ) S(µ) (49) where, S(µ) = 1 ∆T ∞ n=−∞ δ µ − n ∆T (50) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 29 / 120
  • 30. The Fourier Transform of Sampled Signal I Using F˜ (µ) = F(µ) S(µ) (51) we have F˜ (µ) = ∞ −∞ F(τ)S(µ − τ) dτ (52) = 1 ∆T ∞ −∞ F(τ) ∞ n=−∞ δ µ − τ − n ∆T dτ (53) = 1 ∆T ∞ n=−∞ F µ − n ∆T (54) Thus, Fourier Transform F˜(µ) of the sampled signal f ˜(t) is an infinite, periodic sequence of copies of F(µ), the transform of the original, continuous signal Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 30 / 120
  • 31. The Fourier Transform of the Sampled Signals I From, F˜ (µ) = 1 ∆T ∞ n=−∞ F µ − n ∆T (55) , we have ∆T as the sample duration The separation between copies is determined by 1 ∆T This separation can determine if F(µ) is preserved in the sum Accordingly we have oversampling, critical sampling and under-sampling Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 31 / 120
  • 32. The Fourier Transform of the Sampled Signal[2] I Sampling under different conditions Figure: Transforms of the corresponding sampled function under conditions of over-sampling, critically-sampling and undersampling. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 32 / 120
  • 33. Fourier Transform in two variables I Definition The Fourier transform equations can be easily extended to two variables as F(u, v) = ∞ −∞ ∞ −∞ f (x, y)e−j2π(ux+vy) dx dy (56) Simlarly, the inverse transform is given by f (x, y) = ∞ −∞ ∞ −∞ F(u, v)ej2π(ux+vy) du dv (57) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 33 / 120
  • 34. Discrete Fourier Transform [2] I Definition The Fourier Transform of a discrete function of one variable, f [x], x=0,1,2...M − 1 is given by F(u) = 1 M M−1 x=0 f [x]e −j2πux M for u = 0, 1, 2, ..., M − 1 (58) Simiarly, the inverse DFT is given by f [x] = M−1 u=0 F(u)e j2πux M for x = 0, 1, 2, ..., M − 1 (59) The DFT remains a discrete quantity with same number of components as signal. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 34 / 120
  • 35. Discrete Fourier Transform I Key points 1 DFT remains a discrete quantity with same number of components as the signal 2 Same applies for IDFT as well 3 DFT and IDFT always exist (unlike the continuous case) 4 Each summation term called the component of DFT 5 In general, components are complex, Why? Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 35 / 120
  • 36. Discrete Fourier Transform I Representation of DFT in Euler form Usin Euler’s formula, we express F(u) in polar coordinates, F(u) = |F(u)| e−j φ(u) (60) where |F(u)| = R2 (u) + I2 (u) 1 2 (61) is the magnitude spectrum of the Fourier transform and φ(u) = tan−1 I(u) R(u) (62) is the phase angle or the phase spectrum. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 36 / 120
  • 37. Discrete Fourier Transform I Representation of DFT in Euler form Power Spectrum This is yet another important parameter given by P(u) = |F(u)|2 (63) = R2 (u) + I2 (u) (64) Also referred to as spectral density What is the physical significance of power spectrum? Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 37 / 120
  • 38. The Two-dimensional DFT and its Inverse I Definition of Two-dimensional DFT Since image is a 2-D signal, we now proceed to Discrete Fourier Transform in two dimensions. The Discrete Fourier transform of a function f (x, y) of size M x N is given by F(u, v) = 1 MN M−1 x=0 N−1 y=0 f (x, y) e−j2π( ux M +vy N ) (65) for u=0,1,2...M-1 and v=0,1,2,..N-1. Reminder: x,y are spatial variables while u,v are frequency variables Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 38 / 120
  • 39. The Two-dimensional DFT and its Inverse I Definition of Inverse DFT As is the case of 1-D transform, the inverse DFT for two dimensions is given by f (x, y) = M−1 u=0 N−1 v=0 F(u, v) ej2π( ux M +vy N ) (66) for x=0,1,2...M-1 and y=0,1,2,....N-1 Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 39 / 120
  • 40. The Two-dimensional DFT and its Inverse I Representation of 2-D DFT in Euler form Fourier Spectrum |F(u, v)| = R2 (u, v) + I2 (u, v) 1 2 (67) Phase Spectrum φ(u, v) = tan−1 I(u, v) R(u, v) (68) Power Spectrum P(u, v) = |F(u, v)|2 (69) = R2 (u, v) + I2 (u, v) (70) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 40 / 120
  • 41. Properties of Two-dimensional DFT I Translation Property f (x, y)e j2π u0x M + v0y N ↔ F(u − u0, v − v0) (71) Similarly, f (x − x0, y − y0) ↔ F(u, v) e −j2π ux0 M + vy0 N (72) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 41 / 120
  • 42. Properties of Two-dimensional DFT I Translation to the center of the frequency rectangle f (x, y)(−1)x+y ↔ F(u − M 2 , v − N 2 ) (73) And, f (x − M 2 , y − N 2 ) ↔ F(u, v)(−1)u+v (74) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 42 / 120
  • 43. Properties of Two-dimensional DFT I Convolution Property f (x, y) h(x, y) ↔ F(u, v)H(u, v) (75) And, f (x, y)h(x, y) ↔ F(u, v) H(u, v) (76) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 43 / 120
  • 44. Properties of Two-dimensional DFT I Translation to the center of the frequency rectangle f (x, y)(−1)x+y ↔ F(u − M 2 , v − N 2 ) (77) Input image function usually multiplied by (−1)x+y prior to Fourier Transform[1]. Why? Origin of frequency rectangle shifts to the center of the frequency rectangle. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 44 / 120
  • 45. Properties of Two-dimensional DFT I The value of the transform at (u,v)=(0,0) is given by F(0, 0) = 1 MN M−1 x=0 N−1 y=0 f (x, y) (78) which is the average value of f(x,y)(also called dc component of the spectrum). Corollary If the image is f(x,y), the value of Fourier Transform at the origin is equal to the average gray level of the image. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 45 / 120
  • 46. Aliasing[11][2] I Definition Occurs when high frequency components ”masquarade” as low frequency components(called aliased freqencies) 1 A consequence of under-sampling 2 Corrupts the sampled image 3 Additional frequency components are introduced into the sampled image 4 Moire’s pattern introduced in the images (spatially sampled signal) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 46 / 120
  • 47. Aliasing I Moire’s Patterns Figure: A sine waveform being sampled at frequency less than twice the maximum frequency. Source: http: // users. wfu. edu/ matthews/ misc/ DigPhotog/ alias/ Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 47 / 120
  • 48. Aliasing I (a) Original Image (b) Resized Image (c) Moire’s pattern in image due to aliasing Figure: Moire’s pattern in images due to aliasing. Source: http: // users. wfu. edu/ matthews/ misc/ DigPhotog/ alias/ Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 48 / 120
  • 49. Aliasing I Moire’s Patterns[2] Figure: Some more examples of Moire’s pattern. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 49 / 120
  • 50. Anti-Aliasing[11] I 1 Attenuate higher frequencies (relative to what?) 2 Needs to be done before sampling since it cannot be undone after the fact[1].Hence, effective software antialias filters do not exist. 3 Various strategies like notch filters, intentional blurring[6] in front of CCD etc. Question: Any alternative to Antialias filter? Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 50 / 120
  • 51. Basics of Filtering in the frequency domain I Basic Steps Filtering takes place in the following steps [1] 1 Multiply the image function by (−1)x+y . Why? 2 Multiply F(u,v) of the image by filter transfer function H(u,v) 3 Compute the inverse DFT of the above product 4 Obtain the real part 5 Multiply the above result by (−1)x+y Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 51 / 120
  • 52. Basics of Filtering in the frequency domain I Basic Steps Figure: Basic steps for filtering in the frequency domain. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 52 / 120
  • 53. Image Smoothing using lowpass filter I Key points Edges and noises(sharp transitions) in an image contributes significantly to the high frequency content of its Fourier transform Smoothing(blurring) achieved by high frequency attenuation Types of low pass filters to be discussed 1 Ideal Low pass filters 2 ButterWorth filters 3 Gaussian Filters Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 53 / 120
  • 54. Image Smoothing using lowpass filter I Ideal Lowpass Filter[2] A 2-D lowpass filter that passes without attenuation all frequencies within a radius of D0 and at the same time cuts off all other frequencies completely. Mathematically, it is defined as H(u, v) = 1, if D(u, v) ≤ D0, 0, if D(u, v) > D0. (79) Here, D(u, v) is the distance between a point (u,v) in the frequency domain and the center of the frequency rectangle D(u, v) = u − P 2 2 + v − Q 2 2 1 2 (80) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 54 / 120
  • 55. Image Smoothing using lowpass filter I Ideal Lowpass Filter Figure: (a) Perspective plot of an ideal low pass filter (b) Filter displayed as an image (c) Filter radial cross section. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 55 / 120
  • 56. Image Smoothing using lowpass filter I Ideal Lowpass Filter Key Point 1 ILPF is radially symmteric about the origin 2 The point of transition from H(u, v) = 1 to H(u, v) = 0 called cutoff frequency 3 Ideal behavior cannot be realized by electronics; mathematically feasible In order to establish a set of cutoff frequency loci, we compute circles that enclose specified amounts of total image power PT . Mathematically PT = P−1 u=0 Q−1 v=0 P(u, v) (81) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 56 / 120
  • 57. Image Smoothing using lowpass filter I Ideal Lowpass Filter Figure: (a) and (b) show a test pattern image and its spectrum. The circles superimposed on the spectrum hve radii of 10, 30, 60, 160 and 460 pixels respectively. These circles enclose α percent of image power, for α = 87.0, 93.1, 95.7, 97.8 and 99.2 respectively. The spectrum falls off rapidly, with 87 % of the total power being enclosed by a relatively small circle of radius 10. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 57 / 120
  • 58. Image Smoothing using lowpass filter I Ideal Lowpass Filter Figure: (b)-(f) Results of filtering using ILPFs with cutoff frequencies set at radii values 10, 30, 60, 160 and 460. The power removed by these filters was 13, 6.9, 4.3, 2.2 and 0.8 % of the total respectively. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 58 / 120
  • 59. Image Smoothing using lowpass filter I Ideal Lowpass Filter Severe blurring in (b) means majority of the sharp detail information in the picture is contained in the 13 percent power removed by the filter. With increasing radius, lesser power is removed; hence, less blurring Ringing gets finer in texture as the amount of high frequency component removed decreases. Ringing, a characteristic of less popular ideal filters Little edge information lost meant less blurring with increasing α Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 59 / 120
  • 60. Image Smoothing using lowpass filter I Ideal Lowpass Filter Figure: (a)Representation in the spatial domain of an ILPF of radius 5 and size 1000 x 1000. (b) Intensity profile of a horizontal line passing through the center of the image. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 60 / 120
  • 61. Image Smoothing using lowpass filter I Ideal Lowpass Filter Blurring and ringing properties can be explained though convolution theorem Cross section of ILPF in spatial domain bound to appear as a sinc function(why?) Filtering in the spatial domain by convolving h(x,y) with the image Each pixel as a discrete impulse with strength proportional to its intensity Convolving a sinc function with an impulse simply copies the sinc at the location of the impulse Center lobe of the sinc is the principal cause for blurring Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 61 / 120
  • 62. Image Smoothing using lowpass filter I Ideal Lowpass Filter Colvolving a sinc function with every pixel in the image: a nice model to guess the response of ILPF Spread of sinc inversely proportional to radius of H(u,v); means for larger D0, sinc approaches an impulse function In the extreme case, when sinc becomes an impulse function, no blurring upon convolution Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 62 / 120
  • 63. Image Smoothing using lowpass filter I Butterworth Lowpass Filter[2] A butterworth low pass filter of order n and with cutoff frequency D0 from the origin is defined as H(u, v) = 1 1 + D(u,v) D0 2n (82) Here, the terms D(u, v) and D0 have the usual meaning. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 63 / 120
  • 64. Image Smoothing using lowpass filter I Butterworth Lowpass Filter Figure: (a) Perspective plot of a Butterworth lowpass filter transfer function. (b) Filter displayed as an image. (c) Filter radial cross sectionsof orders 1 through 4. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 64 / 120
  • 65. Image Smoothing using lowpass filter I Butterworth Lowpass Filter Figure: (a) and (b) show a test pattern image and its spectrum. The circles superimposed on the spectrum hve radii of 10, 30, 60, 160 and 460 pixels respectively. These circles enclose α percent of image power, for α = 87.0, 93.1, 95.7, 97.8 and 99.2 respectively. The spectrum falls off rapidly, with 87 % of the total power being enclosed by a relatively small circle of radius 10. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 65 / 120
  • 66. Image Smoothing using lowpass filter I Butterworth Lowpass Filter Figure: Results of filtering using BLPFs of order (n)=2, with cutoff frequencies at the radii shown above. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 66 / 120
  • 67. Image Smoothing using lowpass filter I Butterworth Lowpass Filter Figure: Spatial representations of BLPFs of order 1,2,5 and 20, and the corresponding intensity profiles through the center of the filters (the size in all cases in 1000 x 1000 and the cutoff frequency is 5). Ringing increases with filter order Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 67 / 120
  • 68. Image Smoothing using lowpass filter I Butterworth Lowpass Filter Ringing imperceptible in lower orders, significant for higher orders. For lower orders, the ringing remains less compared to ILPF Ringing becomes prominent and comparable for orders above 20 Order 2 most popular since it strikes a balance between filtering and ringing. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 68 / 120
  • 69. Image Smoothing using lowpass filter I Gaussian Lowpass Filters[1] The Gaussian lowpass filter in two dimensions is given by H(u, v) = e −D2(u,v) 2D2 0 (83) Here, the terms D(u, v) and D0 have the usual meaning. When D(u, v) = D0, the GLPF is down to 0.607 of its maximum value. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 69 / 120
  • 70. Image Smoothing using lowpass filter I Gaussian Lowpass Filters[2] Figure: (a) Perspective plot of a GLPF transfer function. (b) Filter displayed as an image. (c) Filter radial cross sections for various values of D0. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 70 / 120
  • 71. Image Smoothing using lowpass filter I Gaussian Lowpass Filter Figure: (a) and (b) show a test pattern image and its spectrum. The circles superimposed on the spectrum hve radii of 10, 30, 60, 160 and 460 pixels respectively. These circles enclose α percent of image power, for α = 87.0, 93.1, 95.7, 97.8 and 99.2 respectively. The spectrum falls off rapidly, with 87 % of the total power being enclosed by a relatively small circle of radius 10. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 71 / 120
  • 72. Image Smoothing using lowpass filter I Gaussian Lowpass Filters Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 72 / 120
  • 73. Image Smoothing using lowpass filter II Gaussian Lowpass Filters Figure: (a) Original Image. (b)-(f) Results of filtering using GLPFs with cutoff frequencies at the radii show above. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 73 / 120
  • 74. Image Smoothing using lowpass filter I Gaussian Lowpass Filters The inverse Fourier transform of GLPF is Gaussian[1] A spatial Gaussian filter obtained by computing the IDFT of H(u,v) will have no ringing[1] A smooth transition in blurring as a function of increasing cutoff frequency obtained GLPF achieved slightly less smoothing than the BLPF of order 2 for same cutoff frequency Assures no ringing[2][3]; However, if a tight control of frequency transition required, then a BLPF is preferred. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 74 / 120
  • 75. Sharpening Frequency Domain Filters[2] I Highpass Filters 1 Edges and other abrupt changes associated with high frequency components. 2 Sharpening means accentuating these high frequency features 3 Assumptions Only zero phase shift filters Filters are radially symmetric All filter functions assumed to be of the size PxQ Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 75 / 120
  • 76. Sharpening Frequency Domain Filters I Ideal Highpass Filters An ideal HPF is given by Hhp(u, v) = 1 − Hlp(u, v) (84) Idea? Fairly Intuitive When the low pass filter attenuates a particular frequency, highpass filter simply allows it. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 76 / 120
  • 77. Sharpening Frequency Domain Filters I Ideal highpass Filter Figure: Perspective plot, image representation and cross section of a typical ideal highpass filter. Source: Digital Image Processing (3rd Edition) by Gonzalez, R.C. and Woods, R.R.,PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 77 / 120
  • 78. Sharpening Frequency Domain Filters I Ideal Highpass Filters A 2-D highpass filter (IHPF) is defined as H(u, v) = 0, if D(u, v) ≤ D0, 1, if D(u, v) > D0. (85) where D0 is the cutoff distance measured from the origin of the frequency rectangle. Question: Why are ideal filters not physically realizable Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 78 / 120
  • 79. Sharpening Frequency Domain Filters I Characteristics of Ideal Highpass Filters Figure: Spatial representation of a typical ideal highpass filter an corresponding gray level profiles. Source: Digital Image Processing (3rd Edition) by Gonzalez, R.C. and Woods, R.R.,PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 79 / 120
  • 80. Sharpening Frequency Domain Filters I Characteristics of Ideal Highpass filters 1 Same ringing characteristics[12][13] 2 Smaller lines and objects appear almost solid white 3 With increasing D0, edges become much cleaner and less distorted and smaller objects get filtered properly. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 80 / 120
  • 81. Sharpening Frequency Domain Filters I Characteristics of Ideal Highpass Filters Figure: Results of ideal highpass filtering the image with D0=15,30 and 80 respectively. Ringing[12][2] quite evident in (a) and (b). Source: Digital Image Processing (3rd Edition) by Gonzalez, R.C. and Woods, R.R.,PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 81 / 120
  • 82. Sharpening Frequency Domain Filters I Butterworth Highpass Filters The transfer function of the Butterworth highpass filter (BHPF) of order n and with cutoff frequency locus at a distance D0 from the origin is given by H(u, v) = 1 1 + D0 D(u,v) 2n (86) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 82 / 120
  • 83. Sharpening Frequency Domain Filters I Characteristics of Butterworth Highpass Filters Figure: Perspective plot, image representation and cross section of a typical Butterworth highpass filter. Source: Digital Image Processing (3rd Edition) by Gonzalez, R.C. and Woods, R.R.,PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 83 / 120
  • 84. Sharpening Frequency Domain Filters I Characteristics of Butterworth Highpass Filters Figure: Spatial representation of a typical Butterworth highpass filter an corresponding gray level profiles. Source: Digital Image Processing (3rd Edition) by Gonzalez, R.C. and Woods, R.R.,PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 84 / 120
  • 85. Sharpening Frequency Domain Filters I Characteristics of Butterworth Highpass Filters 1 Smoother than IHPFs 2 For smaller objects, performance of IHPF and low order BHPF is almost same 3 Transition into higher cutoff frequencies is much smoother with the BHPF. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 85 / 120
  • 86. Sharpening Frequency Domain Filters I Characteristics of Butterworth Highpass Filters Figure: Results of highpass filtering the image using a BHPF or order 2 with D0=15, 30 and 80 respectively. The results are much smoother than those obtained with an ILPF. Source: Digital Image Processing (3rd Edition) by Gonzalez, R.C. and Woods, R.R.,PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 86 / 120
  • 87. Sharpening Frequency Domain Filters I Gaussian Highpass Filters The transfer function of the Gaussian Highpass filter (GHPF) with cutoff frequency locus at a distance D0 from the origin is given by H(u, v) = 1 − e −D2(u,v) 2D2 0 (87) Results are thus much smoother compared to Butterworth filter. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 87 / 120
  • 88. Sharpening Frequency Domain Filters I Characteristics of Gaussian Highpass Filters Figure: Perspective plot, image representation and cross section of a typical Gaussian highpass filter. Source: Digital Image Processing (3rd Edition) by Gonzalez, R.C. and Woods, R.R.,PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 88 / 120
  • 89. Sharpening Frequency Domain Filters I Characteristics of Gaussian Highpass Filters Figure: Spatial representation of a typical Gaussian highpass filter an corresponding gray level profiles. Source: Digital Image Processing (3rd Edition) by Gonzalez, R.C. and Woods, R.R.,PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 89 / 120
  • 90. Sharpening Frequency Domain Filters I Characteristics of Highpass Filters Figure: Results of highpass filtering the image using a GHPF of order 2 with D0=15,30 and 80 respectively.Source: Digital Image Processing (3rd Edition) by Gonzalez, R.C. and Woods, R.R.,PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 90 / 120
  • 91. Unsharp Masking and Highboost Filtering in Spatial Domain I Introduction[2] 1 For sharpening the images 2 Idea is to substract an unsharped version of the image from the original image 3 Process called unsharp masking 4 In printing and publishing industry Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 91 / 120
  • 92. Unsharp masking and Highboost Filtering in Spatial Domain I Basic steps The process of unsharp masking involves Blur the image (using a lowpass filter). Denote it by f −(x, y) Subtract the blurred image from the original (this difference called the mask) gmask(x, y) = f (x, y) − f (x, y) (88) Add the weighted portion of mask to the original g(x, y) = f (x, y) + k ∗ gmask(x, y) (89) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 92 / 120
  • 93. Unsharp Masking and Highboost Filtering in Spatial Domain I Summary From, g(x, y) = f (x, y) + k ∗ gmask(x, y) (90) The parameter k is used for generality. 1 When k = 1, we have unsharp masking 2 When k > 1 we have highboost filtering Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 93 / 120
  • 94. Unsharp Masking and HIghboost Filtering in Spatial Domain I Illustration Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 94 / 120
  • 95. Unsharp Masking and HIghboost Filtering in Spatial Domain II Illustration Figure: 1-D illustration of the mechanics of unsharp masking. (a) Original Signal. (b) Blurred signal with original shown dashed for reference. (c) Unsharp Mask. (d)Sharpened signal obtained by by adding (c) to (a). Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 95 / 120
  • 96. Unsharp Masking and Highboost Filtering in Frequency Domain I Introduction From the discussion wrt to spatial domain, we have gmask(x, y) = f (x, y) − fLP(x, y) (91) where fLP(x, y) = f −1 HLP(u, v)F(u, v) (92) Thus, the modified image could be written as g(x, y) = f (x, y) + k ∗ gmask(x, y) (93) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 96 / 120
  • 97. Unsharp Masking and Highboost Filtering in Spatial Domain I Derivation Continuing from the above discussion, we have g(x, y) = F−1 [1 + k ∗ [1 − HLP(u, v)]]F(u, v) (94) Expressing the same results in terms of a highpass filter, we have g(x, y) = F−1 [1 + k ∗ HHP(u, v)]F(u, v) (95) The term in the square brackets better known as high frequency emphasis filter. The HPFs set the dc term to 0 but not in this case. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 97 / 120
  • 98. Homomorphic Filtering[2] I Introduction 1 Uses illumination-reflectance model to improve the appearance of the image 2 Common procedures include simultaneous intensity rane compression and contrast enhancement Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 98 / 120
  • 99. Homomorphic Filtering I Background From the illumination-reflectance model, an image f (x, y) can be expressed as the product of illumination and reflectance terms. Mathematically, f (x, y) = i(x, y)r(x, y) (96) However, the same cannot be subsituted with the frequency counterparts. Why? Solution: Go for the log Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 99 / 120
  • 100. Homomorphic Filtering I Background We define, z(x, y) = lnf (x, y) (97) = lni(x, y) + lnr(x, y) (98) Then, F(z(x, y)) = F(lni(x, y)) + F(lnr(x, y)) (99) Equivalently, Z(u, v) = Fi (u, v) + Fr (u, v) (100) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 100 / 120
  • 101. Homomorphic Filtering I Filtering With the above transformation, we can filter Z(u, v) using a filter H(u, v) so that the output is S(u, v) = H(u, v)Z(u, v) (101) = H(u, v)Fi (u, v) + H(u, v)Fr (u, v) (102) The filtered image in the spatial domain will then be s(x, y) = F−1 S(u, v) (103) = F−1 H(u, v)Fi (u, v) + F−1 H(u, v)Fr (u, v) (104) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 101 / 120
  • 102. Homomorphic Filtering I Filtering By defining, i (x, y) = F−1 H(u, v)Fi (u, v) (105) and r (x, y) = F−1 H(u, v)Fr (x, y) (106) we have s(x, y) = i (x, y) + r (x, y) (107) Also, by reversing the logarithm, the filtered image obtained could be g(x, y) = es(x,y) (108) = ei (x,y) er (x,y) (109) i0(x, y)r0(x, y) (110) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 102 / 120
  • 103. Homomorphic Filtering I Filtering The basic steps of homomorphic filtering could be represented as Figure: Summary of steps in homomorphic filtering. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 103 / 120
  • 104. Homomorphic Filtering I Filtering 1 Applicable for homomorphic systems 2 The illumination and refectance components could be separated 3 The filter then operates on individual components Note: Illumination components associated with slow spatial variations while reflectance components are usually associated with abrupt spatial variations. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 104 / 120
  • 105. Homomorphic Filtering I Filtering The above constraints are taken care by homomorphic filters. In other words, a homomorphic filter controls the illumination and reflectance components. The net result is simultaneous dynamic range compression and contrast enhancement Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 105 / 120
  • 106. Periodic Noise Reduction by Frequency Domain Filtering I Introduction 1 Freuqency domain analysis suited to noise analysis 2 Periodic noise: Burst of noise in FT 3 Selective filters to isolate noise 4 Common filters used are bandreject, bandpass and notch filters Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 106 / 120
  • 107. Periodic Noise Reduction by Frequency Domain Filtering[2] I Bandreject Filters 1 for noise removal when the location of noise components known 2 Example: an image corrupted by additive periodic noise that can be approximated as two-dimensional sinusoids 3 Because FT of sine consists of two imaginary impulses mirrored about origin. Imaginary, hence, complex conjugates to one another Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 107 / 120
  • 108. Periodic Noise Reduction by Frequency Domain Filtering I Bandreject Filters Figure: From left to right, perspective plots of ideal, Butterworth (of order 1), and Gaussian bandreject filters. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 108 / 120
  • 109. Periodic Noise Reduction by Frequency Domain Filtering I Bandreject Filters Figure: (a) Image corrupted by the sinusoid noise. (b) Spectrum of (a). (c) Butterworth bandreject filter (white represents 1). (d) Results of filtering. (Original image courtsey of NASA) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 109 / 120
  • 110. Periodic Noise Reduction by Frequency Domain Filtering I Bandreject Filters 1 image corrupted by sinusoids 2 Noise components can be seen as symmetric dots in the FT (in this case, on a circle) 3 Butterworth bandreject filter of order 4 4 Radius appropriate to enclose completely the noise impluses 5 Small details and textures restored successfully Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 110 / 120
  • 111. Periodic Noise Reduction by Frequency Domain Filtering I Bandpass Filters 1 Opposite to bandreject filter HBP(u, v) = 1 − HBR(u, v) (111) 2 Can sometimes remove too much image details. 3 Useful in isolating the effects on an image by frequency bands. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 111 / 120
  • 112. Periodic Noise Reduction by Frequency Domain Filtering I Bandpass Filters Figure: Noise pattern of the image obtained by bandpass filtering. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 112 / 120
  • 113. Periodic Noise Reduction by Frequency Domain Filtering I Bandpass Filters 1 Most image details lost 2 Noise patterns recovered accurately 3 Thus, bandpass filtering helps isolate the noise patterns. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 113 / 120
  • 114. Periodic Noise Reduction by Frequency Domain Filtering I Notch Filter 1 Rejects (or passes) frequencies in predefined neighbourhoods about a certain frequency 2 Notch filters appear in symmetric pairs about the origin 3 Usually, they are used to pass the frequencies in the notch area 4 Mathematically, notchpass and notchreject filters are related as HNP(u, v) = 1 − HNR(u, v) (112) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 114 / 120
  • 115. Periodic Noise Reduction by Frequency Domain Filtering I Notch filters Figure: Perspective plots of (a) ideal, (b)Butterworth (order 2), (c) Gaussian notch filters. Source: Digital Image Processing Processing(3rd Edition) by Gonzalez, R.C. and Woods, R.E, PHI Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 115 / 120
  • 116. Inverse Filtering[2] I Introduction 1 First step towards image restoration 2 We assume the degrading function to be H 3 Here, we an estimate of the transform simply by dividing the transform of the degraded image G(u, v), by the degradation function ˆF(u, v) = G(u, v) H(u, v) (113) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 116 / 120
  • 117. Inverse Filtering I Introduction The previous equation can also be written as ˆF(u, v) = F(u, v) + N(u, v) H(u, v) (114) In the above equation, N(u, v) is unknown. Consequence: Even if we know the degraation function, we cannot recover the undegraded image. To add to this, if H(u, v) is small, then it cannot virtually dominate the value of ˆF(u, v) Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 117 / 120
  • 118. Inverse Filtering I Introduction Possible Solution Limit the filter frequencies near the origin since H(0, 0) is highest near the origin. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 118 / 120
  • 119. References I 1 http://nptel.ac.in/courses/111103021/15 2 Digital Image Processing (3rd Edition) by Gonzalez, R.C. and Woods, R.R.,PHI 3 http://web.stanford.edu/class/ee104/lecture4.pdf 4 Digital Image Processing (3rd Edition) by Willian k. Pratt, John Wiley and Sons 5 MIT OpenCourseWare http://math.mit.edu/~gs/cse/websections/cse41.pdf 6 https://en.wikipedia.org/wiki/Dirichlet_conditions 7 Web Tutorialshttps://6002x.mitx.mit.edu/ 8 Stanford University Text web.stanford.edu/class/ee102/lectures/fourtran Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 119 / 120
  • 120. References II 9 Nptel Tutorials(IIT Madras) http://nptel.ac.in/courses/IIT-MADRAS/Principles_Of_ Communication/pdf/Lecture05_FTProperties.pdf 10 Princeton University Courseware https://www.princeton.edu/ ~cuff/ele201/kulkarni_text/frequency.pdf 11 Web Tutorials http://users.wfu.edu/matthews/misc/DigPhotog/alias/ 12 Web Resources imaging.cs.msu.ru/en/research/ringing 13 M. Khambete and M. Joshi, ”Blur and Ringing Artifact Measurement in Image Compression using Wavelet Transform ”, World Academy of Science, Engineering and Technology , 2007. Upendra (Indian Institute of Information Technology, Allahabad[4ex] Image and Video Processing)Filtering in Frequency Domain February 26, 2017 120 / 120