SlideShare a Scribd company logo
1 of 64
Fourier Transform
CS 474/674 – Prof. Bebis
Sections 4.1, 4.2, 4.4, 4.5, 4.6
Image Transforms
• Many times, image processing tasks can be best
performed in a domain other than the spatial domain.
• Key steps
(1) Transform the image
(2) Carry the task(s) in the transformed domain.
(3) Apply inverse transform to return to the spatial domain.
Representative Forward/Inverse Equations
• Forward Transformation (discrete case)
• Inverse Transformation (discrete case)










1
0
1
0
1
,...,
1
,
0
,
1
,...,
1
,
0
)
,
,
,
(
)
,
(
)
,
(
M
x
N
y
N
v
M
u
v
u
y
x
r
y
x
f
v
u
T










1
0
1
0
1
,...,
1
,
0
,
1
,...,
1
,
0
)
,
,
,
(
)
,
(
)
,
(
M
u
N
v
N
y
M
x
v
u
y
x
s
v
u
T
y
x
f
inverse transformation kernel
forward transformation kernel
Kernel Properties
• A kernel is said to be separable if:
• A kernel is said to be symmetric if:
)
,
(
)
,
(
)
,
,
,
( 2
1 v
y
r
u
x
r
v
u
y
x
r 
)
,
(
)
,
(
)
,
,
,
( 1
1 v
y
r
u
x
r
v
u
y
x
r 
Kernel Properties (cont’d)
• Example: exponential kernel:
• It is both separable and symmetric:
2 ( )
( , , , )
ux vy
j
N
r x y u v e




2 ( ) 2 ( ) 2 ( )
ux vy ux vy
j j j
N N N
e e e
  

  
 
( , ) ( , )
r x u r y v
Trigonometric Fourier Series
• Any periodic function f(t) can be
expressed as a weighted (infinite)
sum of sine and cosine functions of
increasing frequency:
0
1 1
2 2
( ) cos( ) sin( )
n n
n n
nt nt
f t a a b
T T
 
 
 
  
 
1 2 1 2
( )cos( ) ( )sin( )
n n
nt nt
a f t dt b f t dt
T T
 
 
 
 
 
 
 
where
basis functions
coefficients of expansion
n=1,2,3,…
Trigonometric Fourier Series (cont’d)
0
1 1
2 2
( ) cos( ) sin( )
n n
n n
nt nt
f t a a b
T T
 
 
 
  
 
Sinusoidals of varying frequency
Trigonometric Fourier Series - Example
Trigonometric Fourier Series - Example
Exponential Fourier Series
where
• This can also be thought as a decomposition into
sines and cosines as implied by Euler’s formula:
0 0
*
2 2
n n
n
n n
c a
a b
c j
c c


 

Relationship to
trigonometric series:
complex exponential
Continuous Fourier Transform (FT)
• The Fourier Transform (FT) of a continuous, non-periodic
function f(x) is defined as follows:
• Given F(u), we can obtain f(x) back using the Inverse Fourier
Transform (IFT):
frequency domain
spatial (or time) domain
Interpreting the Fourier Transform (FT)
Inverse Fourier Transform
Forward Fourier Transform
coefficients of expansion
basis functions
(decompose f(x) in terms of complex
exponentials or equivalently cos/sin
of varying frequencies)
coefficients of
expansion
The Fourier
Transform of
a function
gives us
information
about its
component
frequencies!
FT - Definitions
• In general, F(u) is a complex function:
• Magnitude of FT (or spectrum):
• Phase of FT:
• Magnitude-Phase representation:
• Power of f(x): P(u)=|F(u)|2=
strength of that
frequency in the
function (i.e.,
amplitude)
how sinusoidals
line up (i.e., shift)
Why is FT Useful?
• Easier to remove undesirable frequencies in the
frequency domain (i.e., frequency domain filtering).
• Faster to perform certain operations in the frequency
domain than in the spatial domain (e.g., convolution)
using the Fast Fourier Transform (FFT)
Frequency Filtering: Main Steps
1. Take the FT of f(x):
2. Remove undesired frequencies
by applying a filter:
3. Convert back to spatial domain:
More details later …
Example: Removing undesirable frequencies
remove high
frequencies
filtered
signal
frequency
decomposition
noisy signal
How do frequencies show up in an image?
• Low frequencies correspond to slowly varying pixel
intensities (e.g., smooth areas).
• High frequencies correspond to quickly varying pixel
intensities (e.g., edges)
Original Image Smoothed or low-passed image
(i.e., high frequencies removed)
Common FT Pairs
See handouts posted on
the course’s webpage!
Rectangle function
F(u) Magnitude |F(u)|
u
u
( )
x
rect
W
sin( )
sin ( )
( )
uW
AW AW c uW
uW



sin( )
sin ( )
u
c u
u



where
zeros of sinc( )
(width W)
Note that “negative”
frequencies have no
physical meaning and
only make sense from a
theoretical point of view!
Duality Property
f(x) F(u)
F(x) f(-u)
Prove it using the definition
of the inverse FT!
Note: if f(u) is even,
then f(-u)=f(u)
• Definition of delta function:
Impulse or “delta” function
Continuous
Discrete
0
( )
0 0
if x
x
if x

 

 

 1 0
( )
0 0
if x
x
if x



 


constrained to
satisfy:
• Properties:
Impulse (“delta”) (cont’d)
Continuous Discrete
What is the FT of δ(x)?
1
u
x
2 2 0
( ) 1
j ux j u
x e dx e
 


 

 

1 0
( )
0 0
if x
x
if x



 


• An infinite sum of impulses, Δx units apart:
“Train” of impulses function
( ) ( )
k
s x x k x



  

• It is also a “train” of impulses, Δu=1/Δx units apart:
What is the FT of a s(x)?
1
( ) ( ) ( )
k k
k
S u u u u k u
x x
 
 
 
     
 
 
(see pages 258-259 for a proof)
Spatial/frequency shifts (translation)
)
(
)
(
)
2
(
)
(
)
(
)
1
(
),
(
)
(
0
2
2
0
0
0
u
u
F
e
x
f
u
F
e
x
x
f
then
u
F
x
f
x
u
j
ux
j








Special Cases:
0
2
0 )
( ux
j
e
x
x 
 


)
( 0
2 0
u
u
e x
u
j

 

Cosine function
• FT of the cosine function:
cos(2πu0x)
1/2
F(u)
Note that “negative”
frequencies only make
sense from a theoretical
point of view!
Note: the imaginary part
is zero; this is true for
all real and even f(x)
Sine function
• FT of the sine function:
sin(2πu0x)
jF(u)
Note: the real part
is zero; this true for
all real and odd f(x)
imaginary axis
Note that “negative”
frequencies only make
sense from a theoretical
point of view!
0 0 0
1
(sin(2 ) [ ( ) ( )]
2
F u x u u u u
j
  
   
Extending FT in 2D
• Forward FT
• Inverse FT
2D rectangle function
• FT of a 2D rectangle function:
2D sinc()
top view
Discrete Fourier Transform (DFT)
• Extending the FT to the DFT requires converting
continuous functions into a sequence of discrete
values  apply sampling!
( ) ( ), 0,1,2,..., 1
f x f x x x N
   
( ) ( ), 0,1,2,..., 1
F u F u u u N
   
Δu: sampling step in the frequency domain
Δx: sampling step in the spatial domain
(assuming x0=0)
f(x) F(u)
x-th sample (i.e., x is now an index)
u-th sample (i.e., u is now an index)
Representing Sampling Mathematically
• Sampling a continuous function f(x) can be represented
mathematically by multiplying f(x) with a train of
impulses s(x):
x
( ) ( ) ( ) ( )
k
s x f x f x x k x



  

( ) ( )
k
s x x k x



  

Δx: sampling step in the spatial domain
What is the FT of s(x)f(x) ?
• Using the definition of the FT:
2
{ ( ) ( )} ( ) ( ) j ux
s x f x s x f x e dx
F 



 

1
( )
0
if x k x
x k x
if x k x

 

   
 

2
( ) ( ) j ux
k
f x x k x e dx


 



  


2 ( )
( ) j u k x
k
f k x e 

 



2
( ) ( ) j ux
k
f x x k x e dx





 
  
 
( ) ( ) ( ) ( )
k
s x f x f x x k x



  

Change the order of integration
with summation
What is the FT of s(x)f(x)? (cont’d)
• We will show later that the is periodic with period
1/Δx – i.e., we need to sample one period only.
• Assuming N equally spaced samples in the frequency domain,
the sampling step Δu would be:
• Substituting in we obtain the forward DFT:
1
u
N x
 

, 0,1,2,..., 1
u l u l N
   
where
1
2 /
0
{ ( ) ( )} ( ) , 0,1,2,..., 1
N
j kl N
k
s x f x f k x e l N
F 



   

{ ( ) ( )}
s x f x
F
2 ( )
( ) j u k x
k
f k x e 

 



u-th sample (i.e., u is now an index)
Discrete Fourier Transform (DFT)
• Forward DFT
• Inverse DFT turns out to be:
1
2 /
0
( ) ( ) , 0,1,2,..., 1
N
j kl N
k
F l u f k x e l N




    

1
2 /
0
1
( ) ( ) , 0,1,2,..., 1
N
j kl N
l
f k x F l u e k N
N



    

Replacing l with u and k with x and using the simpler notation:
( ) ( ), 0,1,2,..., 1
F u u F u u N
    ( ) ( ), 0,1,2,..., 1
f x x f x x N
   
x-th sample (i.e., x is now an index)
u-th sample (i.e., u is now an index)
Discrete Fourier Transform (DFT) (cont’d)
Forward DFT:
Inverse DFT:
2
1
0
( ) ( ) , 0,1,2,..., 1
j ux
N
N
x
F u f x e u N




  

2
1
0
1
( ) ( ) , 0,1,2,..., 1
j ux
N
N
u
f x F u e x N
N



  

x-th sample (i.e., x is now an index)
u-th sample (i.e., u is now an index)
Discrete Fourier Transform (DFT) (cont’d)
• We will be using the equivalent definition shown
below where the 1/N constant appears in the forward
DFT instead of the inverse DFT:
Forward DFT
Inverse DFT
2
1
0
1
( ) ( ) , 0,1,2,..., 1
j ux
N
N
x
F u f x e u N
N




  

2
1
0
( ) ( ) , 0,1,2,..., 1
j ux
N
N
u
f x F u e x N



  

u-th sample (i.e., u is now an index)
x-th sample (i.e., x is now an index)
Example
f(0) = 2
f(1) = 3
f(2) = 4
f(3) = 4
F(0) = 13/4
F(1) = 1/4(-2+j)
F(2) = -1/4
F(3) = -1/4(2+j)
13/4
1
5
4
5
4
2
1
0
1
( ) ( ) , 0,1,2,..., 1
j ux
N
N
x
F u f x e u N
N




  

How to correctly sample f(x)?
• Example: suppose that you need to obtain N samples from some
function f(x), e.g., a Gaussian pdf:
• Would the following work?
2
2
( )
2
1
( )
2
x
f x e


 



Suppose μ=0 and σ=1,
almost all the samples will be zero!
for(i=0; i<N; i++)
sample[i]=f(i);
No!
How to correctly sample f(x)? (cont’d)
1. Determine the sampling interval
[μ-3σ, μ+3σ]=[a, b]
2. Determine the sampling step :
Δx = (b-a)/N
3. Obtain the samples:
for(i=0; i<N; i++)
sample[i]=f(a+iΔx);
Extending DFT to 2D
• Assuming that f(x,y) is M x N:
• Forward DFT
• Inverse DFT:
0,1,2,..., 1, 0,1,2,..., 1
( , ) ( , )
u M v N
F u v F u u v v
   
  
0,1,2,..., 1, 0,1,2,..., 1
( , ) ( , )
x M y N
f x y f x x y y
   
  
232 177 82 7
241 18 152 140
156 221 67 3
100 45 1 103
 
 
 
 
 
 
x
y
Notation:
(u-th, v-th) sample (i.e., u and v are now an indices)
(x-th, y-th) sample (i.e., x and y are now an indices)
Extending DFT to 2D (cont’d)
• Special case: f(x,y) is N x N:
• Forward DFT
• Inverse DFT
( , ) ( , ), , 0,1,2,..., 1
F u v F u u v v u v N
    
( , ) ( , ), , 0,1,2,..., 1
f x y f x x y y x y N
    
(u-th, v-th) sample (i.e., u and v are now an indices)
(x-th, y-th) sample (i.e., x and y are now an indices)
2D DFT Interpretation
2D cos/sin functions
How to visualize DFT?
• Typically, we visualize the magnitude (spectrum): |F(u,v)|
• Need to apply some “stretching” since the dynamic range
of |F(u,v)| is very large, e.g.:
without stretching after stretching
original image
|F(u,v)| |D(u,v)|
( , ) log(1 | ( , ) |)
D u v F u v
 
Subsequently
mapping the
values to [0, 255]
will further
improve
visualization!
How to visualize DFT? (cont’d)
• The stretching transformation is needed ONLY for
improving spectrum visualization!
• It does not change the information conveyed by the
spectrum, it only allows us to visualize it better.
• The original magnitude |F(u,v)| should be used in all
other computations.
( , ) log(1 | ( , ) |)
D u v F u v
 
DFT Properties: (1) Separability
• The 2D DFT can be computed using 1D DFTs:
Forward DFT:
2 ( ) 2 ( ) 2 ( )
ux vy ux vy
j j j
N N N
e e e
  

  

This is because
the exponential
kernel is
separable!
• Using the kernel separability:
• Let’s set:
• Then:
DFT Properties: (1) Separability (cont’d)
2D DFT steps:
1. Compute F1(x,v)
2. Compute F(u,v)
1
1
• How to compute F1(x,v)?
• How to compute F(u,v)?
DFT Properties: (1) Separability (cont’d)
)
DFT of the rows of f(x,y)
DFT of the cols of F1(x,v)
x,v=0,1,2,…N-1
u,v=0,1,2,…N-1
N x
1
DFT Properties: (1) Separability (cont’d)
Computing 2D DFT using 1D DFTs:
f(x,y)F1(x,v)F(u,v)
1
The same exactly steps (i.e., rows first, columns
second) can be used to compute the 2D IDFT
using 1D IDFTs.
DFT Properties: (2) Periodicity
• The DFT and its inverse are periodic with period N:
DFT Properties: (3) Symmetry
( , ) ( , ) ( , ) ( , )
f x y F u v R u v jI u v

  
DFT Properties: (4) Translation
f(x,y) F(u,v)
)
N
• Translation in spatial domain:
• Translation in frequency domain:
DFT Properties: (4) Translation (cont’d)
• To “see” a full period of the DFT, we need to translate the
origin of F(u) to N/2 in 1D or of F(u,v) to (N/2,N/2) in 2D
|F(u)|
after translation
|F(u-N/2)|
this is what we see!
DFT Properties: (4) Translation (cont’d)
• Use the following property to preform the translation
F(u-N/2,v-N/2):
• This results to the following result:
)
N
Set
DFT Properties: (4) Translation (cont’d)
• Need to pre-multiply f(x,y) by (-1) x+y to see a full
period.
• You need to “undo” the multiplication by (-1) x+y when
you transform your results back to the spatial domain.
f(x,y) (-1)x+y 2D DFT Filtering  2D IDFT g(x,y) (-1)x+y
DFT Properties: (4) Translation (cont’d)
before translation after translation
sinc
DFT Properties: (5) Rotation
• Rotating f(x,y) by θ rotates F(u,v) by θ
DFT Properties: (6) Addition/Multiplication
DFT Properties: (7) Scale
DFT Properties: (8) Average value
So:
Average:
F(u,v) at u=0, v=0:
Magnitude and Phase of DFT
• What is more important?
• Hint: use the inverse 2D DFT to reconstruct the
input image using only magnitude or phase
information.
magnitude phase
Magnitude and Phase of DFT (cont’d)
Reconstructed image using
magnitude only
(i.e., magnitude determines the
strength of each sinusoidal component)
Reconstructed image using
phase only
(i.e., phase determines
the phase of each sinusoidal component)
Magnitude and Phase of DFT (cont’d)
only phase
only magnitude phase (from woman)
magnitude (from rectangle)
phase (from rectangle)
magnitude (from woman)
phase
Quiz #3
• When: Wednesday, October 6, 2021 at 1pm
• What: Fourier Transform
• Duration
– 10 minutes

More Related Content

Similar to FourierTransform detailed power point presentation

Fourier series Introduction
Fourier series IntroductionFourier series Introduction
Fourier series IntroductionRizwan Kazi
 
Frequency domain methods
Frequency domain methods Frequency domain methods
Frequency domain methods thanhhoang2012
 
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
 
Presentation on fourier transformation
Presentation on fourier transformationPresentation on fourier transformation
Presentation on fourier transformationWasim Shah
 
Speech signal time frequency representation
Speech signal time frequency representationSpeech signal time frequency representation
Speech signal time frequency representationNikolay Karpov
 
Digital Image Processing_ ch3 enhancement freq-domain
Digital Image Processing_ ch3 enhancement freq-domainDigital Image Processing_ ch3 enhancement freq-domain
Digital Image Processing_ ch3 enhancement freq-domainMalik obeisat
 
07 frequency domain DIP
07 frequency domain DIP07 frequency domain DIP
07 frequency domain DIPbabak danyal
 
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformAmr E. Mohamed
 
Fourier series of odd functions with period 2 l
Fourier series of odd functions with period 2 lFourier series of odd functions with period 2 l
Fourier series of odd functions with period 2 lPepa Vidosa Serradilla
 
Chapter 5 Image Processing: Fourier Transformation
Chapter 5 Image Processing: Fourier TransformationChapter 5 Image Processing: Fourier Transformation
Chapter 5 Image Processing: Fourier TransformationVarun Ojha
 
Optics Fourier Transform Ii
Optics Fourier Transform IiOptics Fourier Transform Ii
Optics Fourier Transform Iidiarmseven
 
Seismic data processing lecture 4
Seismic data processing lecture 4Seismic data processing lecture 4
Seismic data processing lecture 4Amin khalil
 
Filtering in frequency domain
Filtering in frequency domainFiltering in frequency domain
Filtering in frequency domainGowriLatha1
 
Seismic data processing lecture 3
Seismic data processing lecture 3Seismic data processing lecture 3
Seismic data processing lecture 3Amin khalil
 

Similar to FourierTransform detailed power point presentation (20)

Fourier slide
Fourier slideFourier slide
Fourier slide
 
Fourier series Introduction
Fourier series IntroductionFourier series Introduction
Fourier series Introduction
 
Frequency domain methods
Frequency domain methods Frequency domain methods
Frequency domain methods
 
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
 
Dft
DftDft
Dft
 
Presentation on fourier transformation
Presentation on fourier transformationPresentation on fourier transformation
Presentation on fourier transformation
 
Speech signal time frequency representation
Speech signal time frequency representationSpeech signal time frequency representation
Speech signal time frequency representation
 
Digital Image Processing_ ch3 enhancement freq-domain
Digital Image Processing_ ch3 enhancement freq-domainDigital Image Processing_ ch3 enhancement freq-domain
Digital Image Processing_ ch3 enhancement freq-domain
 
07 frequency domain DIP
07 frequency domain DIP07 frequency domain DIP
07 frequency domain DIP
 
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
 
Fourier series of odd functions with period 2 l
Fourier series of odd functions with period 2 lFourier series of odd functions with period 2 l
Fourier series of odd functions with period 2 l
 
Chapter 5 Image Processing: Fourier Transformation
Chapter 5 Image Processing: Fourier TransformationChapter 5 Image Processing: Fourier Transformation
Chapter 5 Image Processing: Fourier Transformation
 
Optics Fourier Transform Ii
Optics Fourier Transform IiOptics Fourier Transform Ii
Optics Fourier Transform Ii
 
Lect5 v2
Lect5 v2Lect5 v2
Lect5 v2
 
Seismic data processing lecture 4
Seismic data processing lecture 4Seismic data processing lecture 4
Seismic data processing lecture 4
 
Fourier Transform
Fourier TransformFourier Transform
Fourier Transform
 
Filtering in frequency domain
Filtering in frequency domainFiltering in frequency domain
Filtering in frequency domain
 
Unit ii
Unit iiUnit ii
Unit ii
 
Seismic data processing lecture 3
Seismic data processing lecture 3Seismic data processing lecture 3
Seismic data processing lecture 3
 
Fourier image
Fourier imageFourier image
Fourier image
 

Recently uploaded

GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 

Recently uploaded (20)

GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 

FourierTransform detailed power point presentation

  • 1. Fourier Transform CS 474/674 – Prof. Bebis Sections 4.1, 4.2, 4.4, 4.5, 4.6
  • 2. Image Transforms • Many times, image processing tasks can be best performed in a domain other than the spatial domain. • Key steps (1) Transform the image (2) Carry the task(s) in the transformed domain. (3) Apply inverse transform to return to the spatial domain.
  • 3. Representative Forward/Inverse Equations • Forward Transformation (discrete case) • Inverse Transformation (discrete case)           1 0 1 0 1 ,..., 1 , 0 , 1 ,..., 1 , 0 ) , , , ( ) , ( ) , ( M x N y N v M u v u y x r y x f v u T           1 0 1 0 1 ,..., 1 , 0 , 1 ,..., 1 , 0 ) , , , ( ) , ( ) , ( M u N v N y M x v u y x s v u T y x f inverse transformation kernel forward transformation kernel
  • 4. Kernel Properties • A kernel is said to be separable if: • A kernel is said to be symmetric if: ) , ( ) , ( ) , , , ( 2 1 v y r u x r v u y x r  ) , ( ) , ( ) , , , ( 1 1 v y r u x r v u y x r 
  • 5. Kernel Properties (cont’d) • Example: exponential kernel: • It is both separable and symmetric: 2 ( ) ( , , , ) ux vy j N r x y u v e     2 ( ) 2 ( ) 2 ( ) ux vy ux vy j j j N N N e e e          ( , ) ( , ) r x u r y v
  • 6. Trigonometric Fourier Series • Any periodic function f(t) can be expressed as a weighted (infinite) sum of sine and cosine functions of increasing frequency: 0 1 1 2 2 ( ) cos( ) sin( ) n n n n nt nt f t a a b T T            1 2 1 2 ( )cos( ) ( )sin( ) n n nt nt a f t dt b f t dt T T               where basis functions coefficients of expansion n=1,2,3,…
  • 7. Trigonometric Fourier Series (cont’d) 0 1 1 2 2 ( ) cos( ) sin( ) n n n n nt nt f t a a b T T            Sinusoidals of varying frequency
  • 10. Exponential Fourier Series where • This can also be thought as a decomposition into sines and cosines as implied by Euler’s formula: 0 0 * 2 2 n n n n n c a a b c j c c      Relationship to trigonometric series: complex exponential
  • 11. Continuous Fourier Transform (FT) • The Fourier Transform (FT) of a continuous, non-periodic function f(x) is defined as follows: • Given F(u), we can obtain f(x) back using the Inverse Fourier Transform (IFT): frequency domain spatial (or time) domain
  • 12. Interpreting the Fourier Transform (FT) Inverse Fourier Transform Forward Fourier Transform coefficients of expansion basis functions (decompose f(x) in terms of complex exponentials or equivalently cos/sin of varying frequencies) coefficients of expansion The Fourier Transform of a function gives us information about its component frequencies!
  • 13. FT - Definitions • In general, F(u) is a complex function: • Magnitude of FT (or spectrum): • Phase of FT: • Magnitude-Phase representation: • Power of f(x): P(u)=|F(u)|2= strength of that frequency in the function (i.e., amplitude) how sinusoidals line up (i.e., shift)
  • 14. Why is FT Useful? • Easier to remove undesirable frequencies in the frequency domain (i.e., frequency domain filtering). • Faster to perform certain operations in the frequency domain than in the spatial domain (e.g., convolution) using the Fast Fourier Transform (FFT)
  • 15. Frequency Filtering: Main Steps 1. Take the FT of f(x): 2. Remove undesired frequencies by applying a filter: 3. Convert back to spatial domain: More details later …
  • 16. Example: Removing undesirable frequencies remove high frequencies filtered signal frequency decomposition noisy signal
  • 17. How do frequencies show up in an image? • Low frequencies correspond to slowly varying pixel intensities (e.g., smooth areas). • High frequencies correspond to quickly varying pixel intensities (e.g., edges) Original Image Smoothed or low-passed image (i.e., high frequencies removed)
  • 18. Common FT Pairs See handouts posted on the course’s webpage!
  • 19. Rectangle function F(u) Magnitude |F(u)| u u ( ) x rect W sin( ) sin ( ) ( ) uW AW AW c uW uW    sin( ) sin ( ) u c u u    where zeros of sinc( ) (width W) Note that “negative” frequencies have no physical meaning and only make sense from a theoretical point of view!
  • 20. Duality Property f(x) F(u) F(x) f(-u) Prove it using the definition of the inverse FT! Note: if f(u) is even, then f(-u)=f(u)
  • 21. • Definition of delta function: Impulse or “delta” function Continuous Discrete 0 ( ) 0 0 if x x if x         1 0 ( ) 0 0 if x x if x        constrained to satisfy:
  • 22. • Properties: Impulse (“delta”) (cont’d) Continuous Discrete
  • 23. What is the FT of δ(x)? 1 u x 2 2 0 ( ) 1 j ux j u x e dx e           1 0 ( ) 0 0 if x x if x       
  • 24. • An infinite sum of impulses, Δx units apart: “Train” of impulses function ( ) ( ) k s x x k x       
  • 25. • It is also a “train” of impulses, Δu=1/Δx units apart: What is the FT of a s(x)? 1 ( ) ( ) ( ) k k k S u u u u k u x x                 (see pages 258-259 for a proof)
  • 27. Cosine function • FT of the cosine function: cos(2πu0x) 1/2 F(u) Note that “negative” frequencies only make sense from a theoretical point of view! Note: the imaginary part is zero; this is true for all real and even f(x)
  • 28. Sine function • FT of the sine function: sin(2πu0x) jF(u) Note: the real part is zero; this true for all real and odd f(x) imaginary axis Note that “negative” frequencies only make sense from a theoretical point of view! 0 0 0 1 (sin(2 ) [ ( ) ( )] 2 F u x u u u u j       
  • 29. Extending FT in 2D • Forward FT • Inverse FT
  • 30. 2D rectangle function • FT of a 2D rectangle function: 2D sinc() top view
  • 31. Discrete Fourier Transform (DFT) • Extending the FT to the DFT requires converting continuous functions into a sequence of discrete values  apply sampling! ( ) ( ), 0,1,2,..., 1 f x f x x x N     ( ) ( ), 0,1,2,..., 1 F u F u u u N     Δu: sampling step in the frequency domain Δx: sampling step in the spatial domain (assuming x0=0) f(x) F(u) x-th sample (i.e., x is now an index) u-th sample (i.e., u is now an index)
  • 32. Representing Sampling Mathematically • Sampling a continuous function f(x) can be represented mathematically by multiplying f(x) with a train of impulses s(x): x ( ) ( ) ( ) ( ) k s x f x f x x k x        ( ) ( ) k s x x k x        Δx: sampling step in the spatial domain
  • 33. What is the FT of s(x)f(x) ? • Using the definition of the FT: 2 { ( ) ( )} ( ) ( ) j ux s x f x s x f x e dx F        1 ( ) 0 if x k x x k x if x k x            2 ( ) ( ) j ux k f x x k x e dx             2 ( ) ( ) j u k x k f k x e        2 ( ) ( ) j ux k f x x k x e dx             ( ) ( ) ( ) ( ) k s x f x f x x k x        Change the order of integration with summation
  • 34. What is the FT of s(x)f(x)? (cont’d) • We will show later that the is periodic with period 1/Δx – i.e., we need to sample one period only. • Assuming N equally spaced samples in the frequency domain, the sampling step Δu would be: • Substituting in we obtain the forward DFT: 1 u N x    , 0,1,2,..., 1 u l u l N     where 1 2 / 0 { ( ) ( )} ( ) , 0,1,2,..., 1 N j kl N k s x f x f k x e l N F          { ( ) ( )} s x f x F 2 ( ) ( ) j u k x k f k x e        u-th sample (i.e., u is now an index)
  • 35. Discrete Fourier Transform (DFT) • Forward DFT • Inverse DFT turns out to be: 1 2 / 0 ( ) ( ) , 0,1,2,..., 1 N j kl N k F l u f k x e l N           1 2 / 0 1 ( ) ( ) , 0,1,2,..., 1 N j kl N l f k x F l u e k N N          Replacing l with u and k with x and using the simpler notation: ( ) ( ), 0,1,2,..., 1 F u u F u u N     ( ) ( ), 0,1,2,..., 1 f x x f x x N     x-th sample (i.e., x is now an index) u-th sample (i.e., u is now an index)
  • 36. Discrete Fourier Transform (DFT) (cont’d) Forward DFT: Inverse DFT: 2 1 0 ( ) ( ) , 0,1,2,..., 1 j ux N N x F u f x e u N         2 1 0 1 ( ) ( ) , 0,1,2,..., 1 j ux N N u f x F u e x N N        x-th sample (i.e., x is now an index) u-th sample (i.e., u is now an index)
  • 37. Discrete Fourier Transform (DFT) (cont’d) • We will be using the equivalent definition shown below where the 1/N constant appears in the forward DFT instead of the inverse DFT: Forward DFT Inverse DFT 2 1 0 1 ( ) ( ) , 0,1,2,..., 1 j ux N N x F u f x e u N N         2 1 0 ( ) ( ) , 0,1,2,..., 1 j ux N N u f x F u e x N        u-th sample (i.e., u is now an index) x-th sample (i.e., x is now an index)
  • 38. Example f(0) = 2 f(1) = 3 f(2) = 4 f(3) = 4 F(0) = 13/4 F(1) = 1/4(-2+j) F(2) = -1/4 F(3) = -1/4(2+j) 13/4 1 5 4 5 4 2 1 0 1 ( ) ( ) , 0,1,2,..., 1 j ux N N x F u f x e u N N        
  • 39. How to correctly sample f(x)? • Example: suppose that you need to obtain N samples from some function f(x), e.g., a Gaussian pdf: • Would the following work? 2 2 ( ) 2 1 ( ) 2 x f x e        Suppose μ=0 and σ=1, almost all the samples will be zero! for(i=0; i<N; i++) sample[i]=f(i); No!
  • 40. How to correctly sample f(x)? (cont’d) 1. Determine the sampling interval [μ-3σ, μ+3σ]=[a, b] 2. Determine the sampling step : Δx = (b-a)/N 3. Obtain the samples: for(i=0; i<N; i++) sample[i]=f(a+iΔx);
  • 41. Extending DFT to 2D • Assuming that f(x,y) is M x N: • Forward DFT • Inverse DFT: 0,1,2,..., 1, 0,1,2,..., 1 ( , ) ( , ) u M v N F u v F u u v v        0,1,2,..., 1, 0,1,2,..., 1 ( , ) ( , ) x M y N f x y f x x y y        232 177 82 7 241 18 152 140 156 221 67 3 100 45 1 103             x y Notation: (u-th, v-th) sample (i.e., u and v are now an indices) (x-th, y-th) sample (i.e., x and y are now an indices)
  • 42. Extending DFT to 2D (cont’d) • Special case: f(x,y) is N x N: • Forward DFT • Inverse DFT ( , ) ( , ), , 0,1,2,..., 1 F u v F u u v v u v N      ( , ) ( , ), , 0,1,2,..., 1 f x y f x x y y x y N      (u-th, v-th) sample (i.e., u and v are now an indices) (x-th, y-th) sample (i.e., x and y are now an indices)
  • 43. 2D DFT Interpretation 2D cos/sin functions
  • 44. How to visualize DFT? • Typically, we visualize the magnitude (spectrum): |F(u,v)| • Need to apply some “stretching” since the dynamic range of |F(u,v)| is very large, e.g.: without stretching after stretching original image |F(u,v)| |D(u,v)| ( , ) log(1 | ( , ) |) D u v F u v   Subsequently mapping the values to [0, 255] will further improve visualization!
  • 45. How to visualize DFT? (cont’d) • The stretching transformation is needed ONLY for improving spectrum visualization! • It does not change the information conveyed by the spectrum, it only allows us to visualize it better. • The original magnitude |F(u,v)| should be used in all other computations. ( , ) log(1 | ( , ) |) D u v F u v  
  • 46. DFT Properties: (1) Separability • The 2D DFT can be computed using 1D DFTs: Forward DFT: 2 ( ) 2 ( ) 2 ( ) ux vy ux vy j j j N N N e e e         This is because the exponential kernel is separable!
  • 47. • Using the kernel separability: • Let’s set: • Then: DFT Properties: (1) Separability (cont’d) 2D DFT steps: 1. Compute F1(x,v) 2. Compute F(u,v) 1 1
  • 48. • How to compute F1(x,v)? • How to compute F(u,v)? DFT Properties: (1) Separability (cont’d) ) DFT of the rows of f(x,y) DFT of the cols of F1(x,v) x,v=0,1,2,…N-1 u,v=0,1,2,…N-1 N x 1
  • 49. DFT Properties: (1) Separability (cont’d) Computing 2D DFT using 1D DFTs: f(x,y)F1(x,v)F(u,v) 1 The same exactly steps (i.e., rows first, columns second) can be used to compute the 2D IDFT using 1D IDFTs.
  • 50. DFT Properties: (2) Periodicity • The DFT and its inverse are periodic with period N:
  • 51. DFT Properties: (3) Symmetry ( , ) ( , ) ( , ) ( , ) f x y F u v R u v jI u v    
  • 52. DFT Properties: (4) Translation f(x,y) F(u,v) ) N • Translation in spatial domain: • Translation in frequency domain:
  • 53. DFT Properties: (4) Translation (cont’d) • To “see” a full period of the DFT, we need to translate the origin of F(u) to N/2 in 1D or of F(u,v) to (N/2,N/2) in 2D |F(u)| after translation |F(u-N/2)| this is what we see!
  • 54. DFT Properties: (4) Translation (cont’d) • Use the following property to preform the translation F(u-N/2,v-N/2): • This results to the following result: ) N Set
  • 55. DFT Properties: (4) Translation (cont’d) • Need to pre-multiply f(x,y) by (-1) x+y to see a full period. • You need to “undo” the multiplication by (-1) x+y when you transform your results back to the spatial domain. f(x,y) (-1)x+y 2D DFT Filtering  2D IDFT g(x,y) (-1)x+y
  • 56. DFT Properties: (4) Translation (cont’d) before translation after translation sinc
  • 57. DFT Properties: (5) Rotation • Rotating f(x,y) by θ rotates F(u,v) by θ
  • 58. DFT Properties: (6) Addition/Multiplication
  • 60. DFT Properties: (8) Average value So: Average: F(u,v) at u=0, v=0:
  • 61. Magnitude and Phase of DFT • What is more important? • Hint: use the inverse 2D DFT to reconstruct the input image using only magnitude or phase information. magnitude phase
  • 62. Magnitude and Phase of DFT (cont’d) Reconstructed image using magnitude only (i.e., magnitude determines the strength of each sinusoidal component) Reconstructed image using phase only (i.e., phase determines the phase of each sinusoidal component)
  • 63. Magnitude and Phase of DFT (cont’d) only phase only magnitude phase (from woman) magnitude (from rectangle) phase (from rectangle) magnitude (from woman) phase
  • 64. Quiz #3 • When: Wednesday, October 6, 2021 at 1pm • What: Fourier Transform • Duration – 10 minutes