SlideShare a Scribd company logo
1 of 50
Download to read offline
FREQUENCY DOMAIN PROCESSING
FOURIER TRANSFORM
CS-467 Digital Image Processing
1
Frequency Domain
• Frequency domain is the domain for analysis
of signals with respect to frequency
• Time domain representation of a signal (in 1-D
case) and spatial domain (in 2-D case) shows
how the signal changes in time or space,
respectively
• Frequency domain representation shows how
much of the signal lies within each given
frequency band over a range of frequencies
2
Importance of Frequency Domain
• Frequency domain is very important in signal processing
• It shows which frequencies participate in the formation of a
signal and shows their contribution to this formation, as well
as the phase shift for each frequency
• It is very important to be able to design filters that eliminate
(correct) contribution of some certain frequencies to a
signal, passing other frequencies with no changes
• It is also very important to be able to restore a signal from
distortions caused by its convolution with a distorting
function (typical example – blur in image processing)
• It can also be used for solving image recognition problems,
for example, for “target recognition”
3
Frequency Domain Representation
• A mechanism, which is used to get the
frequency domain representation of a signal
defined in the time or spatial domain is the
Fourier transform
• The inverse Fourier transform is used to get
the time or spatial domain representation of a
signal from its frequency domain
representation
4
Jean Baptiste Joseph Fourier
(1768-1830)
• French mathematician and physicist
• Investigating how it is possible to compute
different functions representing them through
some well known functions, Fourier found (1807,
published in 1822) that any periodic function can
be represented as the sum of sines and/or
cosines of different frequencies (Fourier series)
• Non-periodic, but bounded functions, can be
represented as the integral of sines and/or
cosines multiplied by a weighting function
(Fourier transform)
5
Fourier Representation
6
© 1992-2008 R. C. Gonzalez & R.E. Woods
Orthogonal Functions
The continuous functions of a real variable
are called orthogonal on the interval , if
{ } { }0 1( ) ( ), ( ),...iu t u t u t=
( )0 0,t t T+
0
0
, if
( ) ( )
,0 if
t t
j k
t
j k
u u dt
k
c
t t
j
+
=
= 
≠
∫
If c=1 then then functions
are called orthonormal
{ } { }0 1( ) ( ), ( ),...ju t u t u t=
7
Orthogonal Vectors
A set of n-dimensional vectors
over the field of complex numbers is called orthogonal, if
( )
dot product
1 1
0
, if
, ...
, if
j k j k
j k n n
j k
U U u
c
u u u
j k
=
= + + = 
≠
If then is complex-conjugated to u
If c=1 then vectors
are called orthonormal
{ } { }1 0 1( ,..., ) , ( ),... ;j j j
j n sU u u U U t u= = ∈
{ } { }1 0 1( ,..., ) , ,... ;j j j
j n sU u u U U u= = ∈
u a bi= + u a bi= −
8
Signals and Functions
• Any signal can be treated as a function, which is defined
either on the temporal interval (for 1-D signals) or on the
space interval (for 2-D signals)
• For example, x(t) is a 1-D signal, which is defined on the
interval
• is a 2-D signal. Which is defined on the interval
( )0 0,t t T+
9
( ),f x y
( )0 0 0 0( , ),( , )x x N y y M+ +
Signals and Functions
• Any signal can be represented as the following orthogonal
series (can be broken down in the combination of
orthogonal functions)
• To find coefficients it is enough to multiply the last
equation by and to integrate it:
0
( ) ( )j j
j
x t a u t
∞
=
= ∑
ja
( )ku t
0 0
0 0
0
( ) ( )( ) ( )
t T t T
j jk k
jt t
x t dt a u t dt u t tu
+ + ∞
=
= ∑∫ ∫
10
Signals and Functions
• Taking into account that the functions
are orthogonal, we obtain
{ } { }0 1( ) ( ), ( ),...iu t u t u t=
0 0
0 0
0
0
0
,if
( ) ( )
1
(
( ) ( )
) ;( ) 0,1,2,...
t T t T
j j
jt t
c j k
t T
t
k k
k k
x t dt a u t dt
x t dt
u
a
t u t
u kt
c
+ + ∞
=
= =
+
= ⇒
⇒= =
∑∫ ∫
∫

11
Fourier Representation of Signals
• Let a set consists of functions
• Then
• where is called a main angular frequency, which
determines a period of
• If k is a frequency then is the angular frequency
{ } { }0 1( ) ( ), ( ),...ju t u t u t=
{ }0 01, cos , sin , 1,2,...j t j t jω ω =
0 0
0
0
1 1
( ) ( )
cos ( ) sin ( )
j j
j
j j
j j
x t a u t
a b j t c j tω ω
∞
=
∞ ∞
= =
= =
=+ +
∑
∑ ∑
0ω
02 /T π ω= 0 0cos , sinj t j tω ω
12
2 kω π=
Fourier Representation of Signals
• Taking into account that (i is an imaginary unit)
• then
13
( )
( )
0 0
0 0
0
0
1
cos
2
1
sin
2
ij t ij t
ij t ij t
j t e e
j t e e
i
ω ω
ω ω
ω
ω
−
−
= +
= −
0
0 0
2
( )
ij t
ij t T
j j
j j
x t d e d e
π
ω
∞ ∞
= =
= =∑ ∑
Fourier Representation of Signals
• Coefficients can be obtained fromja
14
0
0
( ) as follows:ik t
j
j
x t d e ω
∞
=
= ∑
0
/2
0
/2
2
( ) , = 2
T
ik t
j
T
d x t e dt k
T
ω π
ω π−
−
=∫
Fourier Transform
• Thus, the Fourier transform of x(t) is
• where
is the continuous angular frequency
• and is a frequency
21
( ) ( ) ( ) ( )i t i t
x x
k
F x t e dt F x t e dtk
T
πω
ω
∞ ∞
− −
−∞ −∞
= = =∫ ∫
15
( )
0
0 , 0,1,2,.2 ./ .2 /k k kT T k
ω
ω ω π π= ==

k
Inverse Fourier Transform
• The signal x(t) can be restored from its Fourier
transform by
16
( )xF ω
21 1
( ) ( ) ( )
2 2
i t i kt
x xx t F e d F j e duω π
ω ω
π π
∞ ∞
−∞ −∞
=∫ ∫
Discrete Fourier Transform
• If the discrete signal x(t) contains exactly N samples
(this means that x(t) has been obtained by sampling
of the continuous signal during N equal time
intervals), then its Discrete Fourier Transform is
1
2 /
0
1
( ) , 0,1,..., 1( )
N
i jk N
j
x x j ek NF k
N
π
−
−
=
= = −∑
17
Inverse Discrete Fourier Transform
• The signal x(t) can be restored from its
discrete Fourier spectrum as follows:
1
2 /
0
, 0,1,..., 1( ( ))
N
i kj
k
x
N
e j Nx kj F π
−
=
= = −∑
18
Discrete Fourier Transform
• Basic functions of the Discrete Fourier
Transform
form a complete system of the orthogonal functions,
which means that
where º is a component-wise multiplication of vectors
2 /
, 0,1,..., 1; 0,1,..., 1i jk N
kf e j N k Nπ
= = − = −
19
( )
{ } { }
dot product
, if
,
, if
, 0,1,..., 1 0,1,..., 1 :
0
s r k
s r
s r
f f
s r
s r N k
N
N f f f
=
= 
≠
=

∀ ∈ − ∃ ∈ − 

Power and Phase Spectrum
• The absolute values of the Fourier transform
coefficients of the discrete signal x(t) form a Power
Spectrum (or simply a spectrum, or magnitude)
• while the arguments of the of the Fourier transform
coefficients of the discrete signal x(t) form a Phase
Spectrum (phase shifts)
1
2 /
0
1
, 0,1,...,(( ) 1)
N
i jk N
j
x ex jF k N
N
k π
−
−
=
= = −∑
20
1
2 /
0
( )
1
, 0,1,...,( ) a ( 1g a g)r r
N
i jk N
x x
j
ek Nk
N
F kx j π
ϕ
−
−
=
= = = −∑
Power and Phase Spectrum
• The Fourier transform can be written also as
• If a signal is reconstructed from the Fourier
transform, then
• is the phase shift
21
( )
1
2 /
0
1
arg
a2 / r
0
)
)g
(
(
, 0,1,
( )
( ) ..., 1
( ) x
x
N
i i kj N
k
N
i
F k
x
F k
x
kj N
k
F k
F k
e e
e j N
x j π
π
−
=
−
+
=
=
= = −
∑
∑
(arg )
( , 0,1,...,) ) 1( xF k
x
i
xF k F ek k N= = −
arg ( )x
F k
Phase vs. Magnitude
• Oppenheim, A.V.; Lim, J.S., The importance of
phase in signals, IEEE Proceedings, v. 69, No 5,
1981, pp.: 529- 541
• In this paper, it was shown that the phase in the
Fourier spectrum of a signal is much more
informative than the magnitude: particularly in
the Fourier spectrum of images phase contains
the information about all shapes, edges,
orientation of all objects, etc.
Importance of Phase
• Phase contains the information about all the
edges, shapes, and their orientation
23
This image results from
the inverse Fourier
transform applied to the
spectrum synthesized
from the original phases,
but with magnitudes
replaced by the constant
“1”
Image Recognition:
Features Selection
• Thus the Fourier Phase Spectrum can be a
very good source of the objective features
that describe all objects represented by the
corresponding signals.
• The Power Spectrum (magnitude) describes
some global signal properties (for, example
blur, noise, cleanness, contrast, brightness,
etc. for images).
24
Phase
Phase
Magnitude
Importance of Phase
Phase and Magnitude
26
Phase (a) & Magnitude (b) Phase (b) & Magnitude (a)
Magnitude contains the information about the signal’s properties
(a) (b)
Proper treatment of phase
• If phases are treated as
some abstract real
numbers, we may treat
phases such as
and
as much different values.
This would be incorrect
because in fact they are
very close to each other
27
0.001ϕ =
2 0.001 6.282ψ π= − =
A role of phase and magnitude in the
Fourier transform
28
sin1 ; 1; 0t A ϕ⋅ = = 2sin1 ; 2; 0t A ϕ⋅ = =
sin1 2; 1; 2t A ϕ⋅ + = = 2sin1 2; 2; 2t A ϕ⋅ + = =
Convolution
• Convolution of two continuous functions f(t) and
h(t) is a process of flipping (rotating by 1800) one
function about its origin and sliding it past the
other
where stands for the flipping, t is the
displacement needed to slide one function past
the other, is a dummy variable that is
integrated out
29
( ) ( ) ( ) ( ) ( )g t f t h t f h t dτ τ τ
∞
−∞
= ∗ = ÷∫
÷
τ
Discrete Convolution
• Convolution of two discrete functions f(t) and h(t)
is also a process of flipping (rotating by 1800) one
function about its origin and sliding it past the
other
where stands for the flipping (shift
corresponding to the basis, where the
convolution is taken, for the Fourier basis this is
the circular shift), t is the displacement needed to
slide one function past the other
30
1
0
( ) ( ) ( ) ( ) ( ); 0,1,..., 1
N
k
g t f t h t f k h t k t N
−
=
= ∗ = ÷ = −∑
÷ ( )modt k N+
Circular Shift
31
A B C D E F G
E F G A B C D
Circular shift by 3:
( )f t
( 3)f t ÷
Convolution Theorem
• Theorem. Fourier transform of the
convolution of signals x(t) and y(t) equals the
product of the Fourier transforms of these
signals
• Corollary. The convolution of signals x(t) and
y(t) equals the inverse Fourier transform of
the product of their Fourier transforms
32
( ) ( ) ( ); 0,1,..., 1x y x yF k F k F k k N∗ = ⋅ = −
( )1
( ) ( ) ( ) ; 0,1,..., 1x yF Fg j x j y j F j j N−
⋅= ∗ = = −
2-D Continuous Fourier Transform
• Continuous Fourier transform of the function
of two continuous variables
• Continuous inverse 2-D Fourier transform
33
( , )g x y
2 ( )
( , ) ( , ) i xu yv
gF u v g x y e dxdyπ
∞ ∞
− +
−∞ −∞
= ∫ ∫
2 ( )
( , ) ( , ) i xu yv
gg x y F u v e dudvπ
∞ ∞
+
−∞ −∞
= ∫ ∫
2-D Discrete Fourier Transform
• Discrete Fourier transform of the digital image
of size MxN
• Discrete inverse 2-D Fourier transform
34
( , )g x y
1 1 2
0 0
1
( , ) ( , )
ux vyM N i
M N
g
x y
F u v g x y e
MN
π
 − − − + 
 
= =
= ∑∑
1 1 2
0 0
( , ) ( , )
ux vyM N i
M N
g
u v
g x y F u v e
π
 − − + 
 
= =
= ∑∑
Calculation of the
2-D Discrete Fourier Transform
• Since , the 2-D
DFT can be separated – it can be found first
with respect to one dimension (for rows) and
then with respect to another one (for
columns):
35
2 22
ux vy vyuxi ii
M N NM
e e e
π ππ
 
− + −− 
 
= ⋅
1 1 1 12 2 2
0 0 0 0
1 1 1
( , ) ( , ) ( , )
ux vy vy uxM N M Ni i i
M N N M
g
x y x y
F u v g x y e g x y e e
MN M N
π π π
 − − − −− + − − 
 
= = = =
 
=  
 
∑∑ ∑ ∑
Calculation of the
2-D Discrete Fourier Transform
• In practical implementation, 2-D DFT of a digital
image should be calculated as follows:
1) Fourier transform of the rows should be taken,
row by row and the results should be stored in a
matrix (2-D array)
2) This matrix should be transposed
3) Then Fourier transform of the rows of this
transposed matrix should be taken and the
results should be stored in a matrix (2-D array),
which contains the 2-D Fourier transform of the
initial image
36
Calculation of the
2-D Discrete Fourier Transform
• Since the Fast Fourier Transform algorithm
exists only for the dimensions that equal to
some powers of two, an image whose sizes
are not powers of two, should be extended to
the next closest power of two
• This extension should be done better by
mirroring in all directions rather than by zero-
padding, to avoid “boundary effects”
37
Important Properties of 2-D
Discrete Fourier Transform
38
© 1992-2008 R. C. Gonzalez & R.E. Woods
Discrete Cosine Transform (DCT)
• Discrete Cosine Transform of signals x(t) is a
shifted Fourier transform determined by
• The signal x(t) can be restored from its
discrete Cosine spectrum as follows:
39
1
0
1 1
( )cos , 0,1,...,(
2
) 1
N
x
j
x j j k k
N
C k N
N
π−
=
  
= + = −  
  
∑
1
1
1 1
cos , 0,1,..., 1
2
) () 0( )
2
(x x
N
k
j k j N
N
x j C C k
π−
=
  
= + = −  
  
∑
Discrete Cosine Transform (DCT)
• Discrete Cosine Transform, being a shifted Fourier
transform, expresses a finite sequence of data
points in terms of a sum of cosine functions
oscillating at different frequencies
• DCT is equivalent to DFT of roughly twice the
length, operating on real data with even
symmetry (since the Fourier transform of a real
and even function is real and even), where the
input and/or output data are shifted by half a
sample.
40
Discrete Cosine Transform (DCT)
• Discrete Cosine Transform, being a real-valued,
but holding basically the same properties as
Discrete Fourier Transform is used in many
applications, particularly in lossy data
compression (jpeg for image data compression
and mp3 for audio data compression)
• Lossy frequency domain compression is based on
the possibility of neglidging or less accurate
encoding of the spectral coefficients in the high
frequency area
41
2D Discrete Cosine Transform
• 2D DCT is a separable transform (as a 2D DFT) and should be
calculated in the same way
• 8x8 DCT of an image fragment with respect to 2D frequencies
(8x8 DCT is used in jpeg compression)
42
Sampling
43
© 1992-2008 R .C. Gonzalez & R.E. Woods
Sampling
44
© 1992-2008 R .C. Gonzalez & R.E. Woods
[ ]max max,µ µ− - The frequency range of
a band-limited signal
max
1
2
t
µ=
∆
- The Nyquist rate
To recover a signal from its
sampled representation, the
sampling rate must exceed the
Nyquist rate:
max
1
2
t
µ>
∆
Sampling
45
Oversampling
Critically sampling
Undersampling
© 1992-2008 R .C. Gonzalez & R.E. Woods
Sampling – Reconstruction from the
Oversampled Discrete Signal
46
© 1992-2008 R .C. Gonzalez & R.E. Woods
Aliasing
• Aliasing (frequency aliasing) is a process in
which high frequency components of a
continuous function “masquerade” as lower
frequencies in the sampled function (“alias”
means a false identity)
• Spatial aliasing is due to undersampling
• Temporal aliasing is related to time intervals
between sequence of images (e.g. rotation of
wheels backwards in a movie, etc.)
47
Undersampling
48
© 1992-2008 R .C. Gonzalez & R.E. Woods
Undersampling and Aliasing
49
© 1992-2008 R .C. Gonzalez & R.E. Woods
Sampling – Reconstruction from
the Undersampled Discrete Signal
50
© 1992-2008 R .C. Gonzalez & R.E. Woods
 Lowering the sampling
rate below the Nyquist rate
leads to impossibility to
isolate a single period of
the Fourier transform

More Related Content

What's hot

Computer vision - photometric
Computer vision - photometricComputer vision - photometric
Computer vision - photometricWael Badawy
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingShaleen Saini
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portionMoe Moe Myint
 
Lecture 3 image sampling and quantization
Lecture 3 image sampling and quantizationLecture 3 image sampling and quantization
Lecture 3 image sampling and quantizationVARUN KUMAR
 
Contrast enhancement in digital images
Contrast enhancement in digital imagesContrast enhancement in digital images
Contrast enhancement in digital imagesSakher BELOUADAH
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and RepresentationAmnaakhaan
 
Digital Image Processing: Digital Image Fundamentals
Digital Image Processing: Digital Image FundamentalsDigital Image Processing: Digital Image Fundamentals
Digital Image Processing: Digital Image FundamentalsMostafa G. M. Mostafa
 
Chapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementChapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementVarun Ojha
 
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
 
Basics of edge detection and forier transform
Basics of edge detection and forier transformBasics of edge detection and forier transform
Basics of edge detection and forier transformSimranjit Singh
 
introduction to Digital Image Processing
introduction to Digital Image Processingintroduction to Digital Image Processing
introduction to Digital Image Processingnikesh gadare
 
Image Registration (Digital Image Processing)
Image Registration (Digital Image Processing)Image Registration (Digital Image Processing)
Image Registration (Digital Image Processing)VARUN KUMAR
 
Image Processing Basics
Image Processing BasicsImage Processing Basics
Image Processing BasicsA B Shinde
 
Introduction to Digital Image Processing
Introduction to Digital Image ProcessingIntroduction to Digital Image Processing
Introduction to Digital Image Processingkalaimuthu2
 
Thresholding.ppt
Thresholding.pptThresholding.ppt
Thresholding.pptshankar64
 

What's hot (20)

Computer vision - photometric
Computer vision - photometricComputer vision - photometric
Computer vision - photometric
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
 
Lecture 3 image sampling and quantization
Lecture 3 image sampling and quantizationLecture 3 image sampling and quantization
Lecture 3 image sampling and quantization
 
M.sc.iii sem digital image processing unit i
M.sc.iii sem digital image processing unit iM.sc.iii sem digital image processing unit i
M.sc.iii sem digital image processing unit i
 
Image transforms
Image transformsImage transforms
Image transforms
 
Contrast enhancement in digital images
Contrast enhancement in digital imagesContrast enhancement in digital images
Contrast enhancement in digital images
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and Representation
 
Digital Image Processing: Digital Image Fundamentals
Digital Image Processing: Digital Image FundamentalsDigital Image Processing: Digital Image Fundamentals
Digital Image Processing: Digital Image Fundamentals
 
Chapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementChapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image Enhancement
 
DIGITAL IMAGE PROCESSING
DIGITAL IMAGE PROCESSINGDIGITAL IMAGE PROCESSING
DIGITAL 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
 
Basics of edge detection and forier transform
Basics of edge detection and forier transformBasics of edge detection and forier transform
Basics of edge detection and forier transform
 
Spatial domain and filtering
Spatial domain and filteringSpatial domain and filtering
Spatial domain and filtering
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
introduction to Digital Image Processing
introduction to Digital Image Processingintroduction to Digital Image Processing
introduction to Digital Image Processing
 
Image Registration (Digital Image Processing)
Image Registration (Digital Image Processing)Image Registration (Digital Image Processing)
Image Registration (Digital Image Processing)
 
Image Processing Basics
Image Processing BasicsImage Processing Basics
Image Processing Basics
 
Introduction to Digital Image Processing
Introduction to Digital Image ProcessingIntroduction to Digital Image Processing
Introduction to Digital Image Processing
 
Thresholding.ppt
Thresholding.pptThresholding.ppt
Thresholding.ppt
 

Similar to Lecture 9

Ch4 (1)_fourier series, fourier transform
Ch4 (1)_fourier series, fourier transformCh4 (1)_fourier series, fourier transform
Ch4 (1)_fourier series, fourier transformShalabhMishra10
 
Signals and Systems-Fourier Series and Transform
Signals and Systems-Fourier Series and TransformSignals and Systems-Fourier Series and Transform
Signals and Systems-Fourier Series and TransformPraveen430329
 
Optics Fourier Transform Ii
Optics Fourier Transform IiOptics Fourier Transform Ii
Optics Fourier Transform Iidiarmseven
 
FourierTransform detailed power point presentation
FourierTransform detailed power point presentationFourierTransform detailed power point presentation
FourierTransform detailed power point presentationssuseracb8ba
 
Lecture7 Signal and Systems
Lecture7 Signal and SystemsLecture7 Signal and Systems
Lecture7 Signal and Systemsbabak danyal
 
SP_BEE2143_C1.pptx
SP_BEE2143_C1.pptxSP_BEE2143_C1.pptx
SP_BEE2143_C1.pptxIffahSkmd
 
5. fourier properties
5. fourier properties5. fourier properties
5. fourier propertiesskysunilyadav
 
Fourier series Introduction
Fourier series IntroductionFourier series Introduction
Fourier series IntroductionRizwan Kazi
 
imagetransforms1-210417050321.pptx
imagetransforms1-210417050321.pptximagetransforms1-210417050321.pptx
imagetransforms1-210417050321.pptxMrsSDivyaBME
 
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
 
IVR - Chapter 3 - Basics of filtering II: Spectral filters
IVR - Chapter 3 - Basics of filtering II: Spectral filtersIVR - Chapter 3 - Basics of filtering II: Spectral filters
IVR - Chapter 3 - Basics of filtering II: Spectral filtersCharles Deledalle
 
Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...
Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...
Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...Simen Li
 

Similar to Lecture 9 (20)

Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Ch4 (1)_fourier series, fourier transform
Ch4 (1)_fourier series, fourier transformCh4 (1)_fourier series, fourier transform
Ch4 (1)_fourier series, fourier transform
 
Signals and Systems-Fourier Series and Transform
Signals and Systems-Fourier Series and TransformSignals and Systems-Fourier Series and Transform
Signals and Systems-Fourier Series and Transform
 
Optics Fourier Transform Ii
Optics Fourier Transform IiOptics Fourier Transform Ii
Optics Fourier Transform Ii
 
Fourier slide
Fourier slideFourier slide
Fourier slide
 
FourierTransform detailed power point presentation
FourierTransform detailed power point presentationFourierTransform detailed power point presentation
FourierTransform detailed power point presentation
 
Lecture7 Signal and Systems
Lecture7 Signal and SystemsLecture7 Signal and Systems
Lecture7 Signal and Systems
 
Ch15 transforms
Ch15 transformsCh15 transforms
Ch15 transforms
 
SP_BEE2143_C1.pptx
SP_BEE2143_C1.pptxSP_BEE2143_C1.pptx
SP_BEE2143_C1.pptx
 
5. fourier properties
5. fourier properties5. fourier properties
5. fourier properties
 
Fourier series Introduction
Fourier series IntroductionFourier series Introduction
Fourier series Introduction
 
Fourier transform
Fourier transformFourier transform
Fourier transform
 
z transforms
z transformsz transforms
z transforms
 
unit 4,5 (1).docx
unit 4,5 (1).docxunit 4,5 (1).docx
unit 4,5 (1).docx
 
imagetransforms1-210417050321.pptx
imagetransforms1-210417050321.pptximagetransforms1-210417050321.pptx
imagetransforms1-210417050321.pptx
 
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
 
Unit ii
Unit iiUnit ii
Unit ii
 
IVR - Chapter 3 - Basics of filtering II: Spectral filters
IVR - Chapter 3 - Basics of filtering II: Spectral filtersIVR - Chapter 3 - Basics of filtering II: Spectral filters
IVR - Chapter 3 - Basics of filtering II: Spectral filters
 
Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...
Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...
Circuit Network Analysis - [Chapter5] Transfer function, frequency response, ...
 

More from Wael Sharba (20)

Project 8
Project 8Project 8
Project 8
 
Project 7
Project 7Project 7
Project 7
 
Project 6
Project 6Project 6
Project 6
 
Project 5
Project 5Project 5
Project 5
 
Project 4
Project 4Project 4
Project 4
 
Project 2
Project 2Project 2
Project 2
 
Project 1
Project 1Project 1
Project 1
 
Project 3
Project 3Project 3
Project 3
 
Project 9
Project 9Project 9
Project 9
 
Lecture 14
Lecture 14Lecture 14
Lecture 14
 
Lecture 13
Lecture 13Lecture 13
Lecture 13
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
Lecture 8
Lecture 8Lecture 8
Lecture 8
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 

Recently uploaded

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 

Recently uploaded (20)

Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

Lecture 9

  • 1. FREQUENCY DOMAIN PROCESSING FOURIER TRANSFORM CS-467 Digital Image Processing 1
  • 2. Frequency Domain • Frequency domain is the domain for analysis of signals with respect to frequency • Time domain representation of a signal (in 1-D case) and spatial domain (in 2-D case) shows how the signal changes in time or space, respectively • Frequency domain representation shows how much of the signal lies within each given frequency band over a range of frequencies 2
  • 3. Importance of Frequency Domain • Frequency domain is very important in signal processing • It shows which frequencies participate in the formation of a signal and shows their contribution to this formation, as well as the phase shift for each frequency • It is very important to be able to design filters that eliminate (correct) contribution of some certain frequencies to a signal, passing other frequencies with no changes • It is also very important to be able to restore a signal from distortions caused by its convolution with a distorting function (typical example – blur in image processing) • It can also be used for solving image recognition problems, for example, for “target recognition” 3
  • 4. Frequency Domain Representation • A mechanism, which is used to get the frequency domain representation of a signal defined in the time or spatial domain is the Fourier transform • The inverse Fourier transform is used to get the time or spatial domain representation of a signal from its frequency domain representation 4
  • 5. Jean Baptiste Joseph Fourier (1768-1830) • French mathematician and physicist • Investigating how it is possible to compute different functions representing them through some well known functions, Fourier found (1807, published in 1822) that any periodic function can be represented as the sum of sines and/or cosines of different frequencies (Fourier series) • Non-periodic, but bounded functions, can be represented as the integral of sines and/or cosines multiplied by a weighting function (Fourier transform) 5
  • 6. Fourier Representation 6 © 1992-2008 R. C. Gonzalez & R.E. Woods
  • 7. Orthogonal Functions The continuous functions of a real variable are called orthogonal on the interval , if { } { }0 1( ) ( ), ( ),...iu t u t u t= ( )0 0,t t T+ 0 0 , if ( ) ( ) ,0 if t t j k t j k u u dt k c t t j + = =  ≠ ∫ If c=1 then then functions are called orthonormal { } { }0 1( ) ( ), ( ),...ju t u t u t= 7
  • 8. Orthogonal Vectors A set of n-dimensional vectors over the field of complex numbers is called orthogonal, if ( ) dot product 1 1 0 , if , ... , if j k j k j k n n j k U U u c u u u j k = = + + =  ≠ If then is complex-conjugated to u If c=1 then vectors are called orthonormal { } { }1 0 1( ,..., ) , ( ),... ;j j j j n sU u u U U t u= = ∈ { } { }1 0 1( ,..., ) , ,... ;j j j j n sU u u U U u= = ∈ u a bi= + u a bi= − 8
  • 9. Signals and Functions • Any signal can be treated as a function, which is defined either on the temporal interval (for 1-D signals) or on the space interval (for 2-D signals) • For example, x(t) is a 1-D signal, which is defined on the interval • is a 2-D signal. Which is defined on the interval ( )0 0,t t T+ 9 ( ),f x y ( )0 0 0 0( , ),( , )x x N y y M+ +
  • 10. Signals and Functions • Any signal can be represented as the following orthogonal series (can be broken down in the combination of orthogonal functions) • To find coefficients it is enough to multiply the last equation by and to integrate it: 0 ( ) ( )j j j x t a u t ∞ = = ∑ ja ( )ku t 0 0 0 0 0 ( ) ( )( ) ( ) t T t T j jk k jt t x t dt a u t dt u t tu + + ∞ = = ∑∫ ∫ 10
  • 11. Signals and Functions • Taking into account that the functions are orthogonal, we obtain { } { }0 1( ) ( ), ( ),...iu t u t u t= 0 0 0 0 0 0 0 ,if ( ) ( ) 1 ( ( ) ( ) ) ;( ) 0,1,2,... t T t T j j jt t c j k t T t k k k k x t dt a u t dt x t dt u a t u t u kt c + + ∞ = = = + = ⇒ ⇒= = ∑∫ ∫ ∫  11
  • 12. Fourier Representation of Signals • Let a set consists of functions • Then • where is called a main angular frequency, which determines a period of • If k is a frequency then is the angular frequency { } { }0 1( ) ( ), ( ),...ju t u t u t= { }0 01, cos , sin , 1,2,...j t j t jω ω = 0 0 0 0 1 1 ( ) ( ) cos ( ) sin ( ) j j j j j j j x t a u t a b j t c j tω ω ∞ = ∞ ∞ = = = = =+ + ∑ ∑ ∑ 0ω 02 /T π ω= 0 0cos , sinj t j tω ω 12 2 kω π=
  • 13. Fourier Representation of Signals • Taking into account that (i is an imaginary unit) • then 13 ( ) ( ) 0 0 0 0 0 0 1 cos 2 1 sin 2 ij t ij t ij t ij t j t e e j t e e i ω ω ω ω ω ω − − = + = − 0 0 0 2 ( ) ij t ij t T j j j j x t d e d e π ω ∞ ∞ = = = =∑ ∑
  • 14. Fourier Representation of Signals • Coefficients can be obtained fromja 14 0 0 ( ) as follows:ik t j j x t d e ω ∞ = = ∑ 0 /2 0 /2 2 ( ) , = 2 T ik t j T d x t e dt k T ω π ω π− − =∫
  • 15. Fourier Transform • Thus, the Fourier transform of x(t) is • where is the continuous angular frequency • and is a frequency 21 ( ) ( ) ( ) ( )i t i t x x k F x t e dt F x t e dtk T πω ω ∞ ∞ − − −∞ −∞ = = =∫ ∫ 15 ( ) 0 0 , 0,1,2,.2 ./ .2 /k k kT T k ω ω ω π π= ==  k
  • 16. Inverse Fourier Transform • The signal x(t) can be restored from its Fourier transform by 16 ( )xF ω 21 1 ( ) ( ) ( ) 2 2 i t i kt x xx t F e d F j e duω π ω ω π π ∞ ∞ −∞ −∞ =∫ ∫
  • 17. Discrete Fourier Transform • If the discrete signal x(t) contains exactly N samples (this means that x(t) has been obtained by sampling of the continuous signal during N equal time intervals), then its Discrete Fourier Transform is 1 2 / 0 1 ( ) , 0,1,..., 1( ) N i jk N j x x j ek NF k N π − − = = = −∑ 17
  • 18. Inverse Discrete Fourier Transform • The signal x(t) can be restored from its discrete Fourier spectrum as follows: 1 2 / 0 , 0,1,..., 1( ( )) N i kj k x N e j Nx kj F π − = = = −∑ 18
  • 19. Discrete Fourier Transform • Basic functions of the Discrete Fourier Transform form a complete system of the orthogonal functions, which means that where º is a component-wise multiplication of vectors 2 / , 0,1,..., 1; 0,1,..., 1i jk N kf e j N k Nπ = = − = − 19 ( ) { } { } dot product , if , , if , 0,1,..., 1 0,1,..., 1 : 0 s r k s r s r f f s r s r N k N N f f f = =  ≠ =  ∀ ∈ − ∃ ∈ −  
  • 20. Power and Phase Spectrum • The absolute values of the Fourier transform coefficients of the discrete signal x(t) form a Power Spectrum (or simply a spectrum, or magnitude) • while the arguments of the of the Fourier transform coefficients of the discrete signal x(t) form a Phase Spectrum (phase shifts) 1 2 / 0 1 , 0,1,...,(( ) 1) N i jk N j x ex jF k N N k π − − = = = −∑ 20 1 2 / 0 ( ) 1 , 0,1,...,( ) a ( 1g a g)r r N i jk N x x j ek Nk N F kx j π ϕ − − = = = = −∑
  • 21. Power and Phase Spectrum • The Fourier transform can be written also as • If a signal is reconstructed from the Fourier transform, then • is the phase shift 21 ( ) 1 2 / 0 1 arg a2 / r 0 ) )g ( ( , 0,1, ( ) ( ) ..., 1 ( ) x x N i i kj N k N i F k x F k x kj N k F k F k e e e j N x j π π − = − + = = = = − ∑ ∑ (arg ) ( , 0,1,...,) ) 1( xF k x i xF k F ek k N= = − arg ( )x F k
  • 22. Phase vs. Magnitude • Oppenheim, A.V.; Lim, J.S., The importance of phase in signals, IEEE Proceedings, v. 69, No 5, 1981, pp.: 529- 541 • In this paper, it was shown that the phase in the Fourier spectrum of a signal is much more informative than the magnitude: particularly in the Fourier spectrum of images phase contains the information about all shapes, edges, orientation of all objects, etc.
  • 23. Importance of Phase • Phase contains the information about all the edges, shapes, and their orientation 23 This image results from the inverse Fourier transform applied to the spectrum synthesized from the original phases, but with magnitudes replaced by the constant “1”
  • 24. Image Recognition: Features Selection • Thus the Fourier Phase Spectrum can be a very good source of the objective features that describe all objects represented by the corresponding signals. • The Power Spectrum (magnitude) describes some global signal properties (for, example blur, noise, cleanness, contrast, brightness, etc. for images). 24
  • 26. Phase and Magnitude 26 Phase (a) & Magnitude (b) Phase (b) & Magnitude (a) Magnitude contains the information about the signal’s properties (a) (b)
  • 27. Proper treatment of phase • If phases are treated as some abstract real numbers, we may treat phases such as and as much different values. This would be incorrect because in fact they are very close to each other 27 0.001ϕ = 2 0.001 6.282ψ π= − =
  • 28. A role of phase and magnitude in the Fourier transform 28 sin1 ; 1; 0t A ϕ⋅ = = 2sin1 ; 2; 0t A ϕ⋅ = = sin1 2; 1; 2t A ϕ⋅ + = = 2sin1 2; 2; 2t A ϕ⋅ + = =
  • 29. Convolution • Convolution of two continuous functions f(t) and h(t) is a process of flipping (rotating by 1800) one function about its origin and sliding it past the other where stands for the flipping, t is the displacement needed to slide one function past the other, is a dummy variable that is integrated out 29 ( ) ( ) ( ) ( ) ( )g t f t h t f h t dτ τ τ ∞ −∞ = ∗ = ÷∫ ÷ τ
  • 30. Discrete Convolution • Convolution of two discrete functions f(t) and h(t) is also a process of flipping (rotating by 1800) one function about its origin and sliding it past the other where stands for the flipping (shift corresponding to the basis, where the convolution is taken, for the Fourier basis this is the circular shift), t is the displacement needed to slide one function past the other 30 1 0 ( ) ( ) ( ) ( ) ( ); 0,1,..., 1 N k g t f t h t f k h t k t N − = = ∗ = ÷ = −∑ ÷ ( )modt k N+
  • 31. Circular Shift 31 A B C D E F G E F G A B C D Circular shift by 3: ( )f t ( 3)f t ÷
  • 32. Convolution Theorem • Theorem. Fourier transform of the convolution of signals x(t) and y(t) equals the product of the Fourier transforms of these signals • Corollary. The convolution of signals x(t) and y(t) equals the inverse Fourier transform of the product of their Fourier transforms 32 ( ) ( ) ( ); 0,1,..., 1x y x yF k F k F k k N∗ = ⋅ = − ( )1 ( ) ( ) ( ) ; 0,1,..., 1x yF Fg j x j y j F j j N− ⋅= ∗ = = −
  • 33. 2-D Continuous Fourier Transform • Continuous Fourier transform of the function of two continuous variables • Continuous inverse 2-D Fourier transform 33 ( , )g x y 2 ( ) ( , ) ( , ) i xu yv gF u v g x y e dxdyπ ∞ ∞ − + −∞ −∞ = ∫ ∫ 2 ( ) ( , ) ( , ) i xu yv gg x y F u v e dudvπ ∞ ∞ + −∞ −∞ = ∫ ∫
  • 34. 2-D Discrete Fourier Transform • Discrete Fourier transform of the digital image of size MxN • Discrete inverse 2-D Fourier transform 34 ( , )g x y 1 1 2 0 0 1 ( , ) ( , ) ux vyM N i M N g x y F u v g x y e MN π  − − − +    = = = ∑∑ 1 1 2 0 0 ( , ) ( , ) ux vyM N i M N g u v g x y F u v e π  − − +    = = = ∑∑
  • 35. Calculation of the 2-D Discrete Fourier Transform • Since , the 2-D DFT can be separated – it can be found first with respect to one dimension (for rows) and then with respect to another one (for columns): 35 2 22 ux vy vyuxi ii M N NM e e e π ππ   − + −−    = ⋅ 1 1 1 12 2 2 0 0 0 0 1 1 1 ( , ) ( , ) ( , ) ux vy vy uxM N M Ni i i M N N M g x y x y F u v g x y e g x y e e MN M N π π π  − − − −− + − −    = = = =   =     ∑∑ ∑ ∑
  • 36. Calculation of the 2-D Discrete Fourier Transform • In practical implementation, 2-D DFT of a digital image should be calculated as follows: 1) Fourier transform of the rows should be taken, row by row and the results should be stored in a matrix (2-D array) 2) This matrix should be transposed 3) Then Fourier transform of the rows of this transposed matrix should be taken and the results should be stored in a matrix (2-D array), which contains the 2-D Fourier transform of the initial image 36
  • 37. Calculation of the 2-D Discrete Fourier Transform • Since the Fast Fourier Transform algorithm exists only for the dimensions that equal to some powers of two, an image whose sizes are not powers of two, should be extended to the next closest power of two • This extension should be done better by mirroring in all directions rather than by zero- padding, to avoid “boundary effects” 37
  • 38. Important Properties of 2-D Discrete Fourier Transform 38 © 1992-2008 R. C. Gonzalez & R.E. Woods
  • 39. Discrete Cosine Transform (DCT) • Discrete Cosine Transform of signals x(t) is a shifted Fourier transform determined by • The signal x(t) can be restored from its discrete Cosine spectrum as follows: 39 1 0 1 1 ( )cos , 0,1,...,( 2 ) 1 N x j x j j k k N C k N N π− =    = + = −      ∑ 1 1 1 1 cos , 0,1,..., 1 2 ) () 0( ) 2 (x x N k j k j N N x j C C k π− =    = + = −      ∑
  • 40. Discrete Cosine Transform (DCT) • Discrete Cosine Transform, being a shifted Fourier transform, expresses a finite sequence of data points in terms of a sum of cosine functions oscillating at different frequencies • DCT is equivalent to DFT of roughly twice the length, operating on real data with even symmetry (since the Fourier transform of a real and even function is real and even), where the input and/or output data are shifted by half a sample. 40
  • 41. Discrete Cosine Transform (DCT) • Discrete Cosine Transform, being a real-valued, but holding basically the same properties as Discrete Fourier Transform is used in many applications, particularly in lossy data compression (jpeg for image data compression and mp3 for audio data compression) • Lossy frequency domain compression is based on the possibility of neglidging or less accurate encoding of the spectral coefficients in the high frequency area 41
  • 42. 2D Discrete Cosine Transform • 2D DCT is a separable transform (as a 2D DFT) and should be calculated in the same way • 8x8 DCT of an image fragment with respect to 2D frequencies (8x8 DCT is used in jpeg compression) 42
  • 43. Sampling 43 © 1992-2008 R .C. Gonzalez & R.E. Woods
  • 44. Sampling 44 © 1992-2008 R .C. Gonzalez & R.E. Woods [ ]max max,µ µ− - The frequency range of a band-limited signal max 1 2 t µ= ∆ - The Nyquist rate To recover a signal from its sampled representation, the sampling rate must exceed the Nyquist rate: max 1 2 t µ> ∆
  • 46. Sampling – Reconstruction from the Oversampled Discrete Signal 46 © 1992-2008 R .C. Gonzalez & R.E. Woods
  • 47. Aliasing • Aliasing (frequency aliasing) is a process in which high frequency components of a continuous function “masquerade” as lower frequencies in the sampled function (“alias” means a false identity) • Spatial aliasing is due to undersampling • Temporal aliasing is related to time intervals between sequence of images (e.g. rotation of wheels backwards in a movie, etc.) 47
  • 48. Undersampling 48 © 1992-2008 R .C. Gonzalez & R.E. Woods
  • 49. Undersampling and Aliasing 49 © 1992-2008 R .C. Gonzalez & R.E. Woods
  • 50. Sampling – Reconstruction from the Undersampled Discrete Signal 50 © 1992-2008 R .C. Gonzalez & R.E. Woods  Lowering the sampling rate below the Nyquist rate leads to impossibility to isolate a single period of the Fourier transform