SlideShare a Scribd company logo
1 of 31
240-373
Image Processing

240-373: Chapter

Montri
Karnjanadecha
montri@coe.psu.ac.t
h
http://
fivedots.coe.psu.ac.t
h/~montri
1
Chapter 14
The Frequency
Domain
240-373: Chapter

2
The Frequency Domain
• Any wave shape can be approximated by a
sum of periodic (such as sine and cosine)
functions.
• a--amplitude of waveform
• f-- frequency (number of times the wave
repeats itself in a given length)
• p--phase (position that the wave starts)
• Usually phase is ignored in image processing
240-373: Chapter

3
240-373: Chapter

4
240-373: Chapter

5
The Hartley Transform
• Discrete Hartley Transform (DHT)
– The M x N image is converted into a second
image (also M x N)
– M and N should be power of 2 (e.g. .., 128, 256,
512, etc.)
– The basic transform depends on calculating the
following for each pixel in the new M x N array
1
H (u , v) =
MN

M −1 N −1

∑∑
x =0 y =0


 ux vy 
 ux vy 
f ( x, y ) ⋅ cos(2π ) −  + sin( 2π ) − 
M N 
 M N 


240-373: Chapter

6
The Hartley Transform
where f(x,y) is the intensity of the pixel at position
(x,y)
H(u,v) is the value of element in frequency domain
– The results are periodic
– The cosine+sine (CAS) term is call “the kernel of
the transformation” (or ”basis function”)

240-373: Chapter

7
The Hartley Transform
• Fast Hartley Transform (FHT)
– M and N must be power of 2
– Much faster than DHT
– Equation:

H (u, v) = { T (u , v) + T ( M − u, v) + T (u , N − v) − T ( M − u , N − v)} / 2

240-373: Chapter

8
The Fourier Transform
• The Fourier transform
– Each element has real and imaginary values
– Formula:

F (u , v) = ∫∫ f ( x, y )e −2iπ ( ux +vy ) dxdy
– f(x,y) is point (x,y) in the original image and F(u,v)
is the point (u,v) in the frequency image

240-373: Chapter

9
The Fourier Transform
• Discrete Fourier Transform (DFT)
 ux vy 

− 2 iπ  + 
1 M −1 N −1
F (u, v) =
f ( x, y )e  M N 
∑∑
MN x =0 y =0
– Imaginary part
1 M −1 N −1
 ux vy 
Fi (u, v) = −
f ( x, y ) sin 2π  + 
∑∑
MN x =0 y =0
M N 

– Real part

1
Fr (u , v) =
MN

M −1 N −1

∑∑
x =0 y =0

 ux vy 
f ( x, y ) cos 2π  + 
M N 

– The actual complex result is Fi(u,v) + Fr(u,v)

240-373: Chapter

10
Fourier Power Spectrum and Inverse
Fourier Transform
• Fourier power spectrum

F (u , v) = Fr (u , v) 2 + Fi (u , v) 2

• Inverse Fourier Transform
1
f ( x, y ) =
MN

240-373: Chapter

M −1 N −1

∑∑ F (u, v)e

 ux vy 
2 iπ  + 
M N 

x =0 y =0

11
Fourier Power Spectrum and Inverse
Fourier Transform
• Fast Fourier Transform (FFT)
– Much faster than DFT
– M and N must be power of 2
– Computation is reduced from M2N2 to
MN log2 M . log2 N (~1/1000 times)

240-373: Chapter

12
Fourier Power Spectrum and Inverse
Fourier Transform
• Optical transformation
– A common approach to view image in frequency
domain

A
D

B
C

Original image

240-373: Chapter

C
B

D
A

Transformed image

13
Power and Autocorrelation Functions
• Power function:

[

1
P (u , v) = F (u , v) = H (u , v) 2 + H (−u ,−v) 2
2

• Autocorrelation function
F (u , v)

2

– Inverse Fourier transform of
or
1
[ H (u, v) 2 + H (−u,−v) 2 ]
– Hartley transform of 2

240-373: Chapter

14

]
Hartley vs Fourier Transform

240-373: Chapter

15
Interpretation of the power function

240-373: Chapter

16
Applications of Frequency Domain
Processing
• Convolution in the frequency domain

240-373: Chapter

17
Applications of Frequency Domain
Processing
– useful when the image is larger than 1024x1024
and the template size is greater than 16x16
– Template and image must be the same size
1
1 1 1
⇒
1 1 0
0

240-373: Chapter

1
1
0
0

0
0
0
0

0
0
0
0

18
– Use FHT or FFT instead of DHT or DFT
– Number of points should be kept small
– The transform is periodic
• zeros must be padded to the image and the template
• minimum image size must be (N+n-1) x (M+m-1)

240-373: Chapter

19
0 1

2

0

4 5 6 0
8 9 10 0
0 0 0 0

240-373: Chapter

1 2 0 0
⊗

45

58

44 12

7 3 0 0
97 110 76 32
=
0 0 0 0
26 29 10 16
0 0 0 0
3 13 14 0

20
– Convolution in frequency domain is “real
convolution”
Normal convolution
0 1

2

0

4 5

6

1 2 0 0

0

⊗

8 9 10 0
0 0

0

0

7 3 0 0
0 0 0 0

45
=

0 0 0 0

58

44 12

97 110 76 32
26

29

10 16

3

13

14

0

Real convolution
0
4
8
0

1 2 0
5 6 0
9 10 0
0 0 0

240-373: Chapter

0
0
⊗
0
0

0
0
0
0

0
0
3
2

0
0 1 4 4
0
4 20 33 18
=
7
36 72 85 38
1
56 87 97 30

21
Convolution using the Fourier transform
Technique 1: Convolution using the Fourier
transform
USE: To perform a convolution
OPERATION:
– zero-padding both the image (MxN) and the
template (m x n) to the size (N+n-1) x (M+m-1)
– Applying FFT to the modified image and template
– Multiplying element by element of the transformed
image against the transformed template

240-373: Chapter

22
Convolution using the Fourier transform
OPERATION: (cont’d)
– Multiplication is done as follows:

F(image)
(r1,i1)

F(template)
F(result)
(r2, i2)
(r1r2 - i1i2, r1i2+r2i1)

i.e. 4 real multiplications and 2 additions
– Performing Inverse Fourier transform

240-373: Chapter

23
Hartley convolution
Technique 2: Hartley convolution
USE: To perform a convolution
OPERATION:
– zero-padding both the image (MxN) and the
template (m x n) to the size (N+n-1) x (M+m-1)
image

0 1

2

template

0

1 2 0 0

4 5 6 0
8 9 10 0
0 0 0 0

7 3 0 0
0 0 0 0
0 0 0 0

240-373: Chapter

24
Hartley convolution
– Applying Hartley transform to the modified image
and template
image

template

11.25 2.25 3.75 − 5.25
− 2.25 − 3.75 − 0.75 2.75

3.25
3.25

3.75 0.75 1.25 − 1.75
− 9.75 − 0.25 − 3.25 1.25

- 1.75 - 1.75 - 1.25 - 1.25
- 1.75 - 0.25 - 1.25 - 2.75

240-373: Chapter

25

3.25
1.75

0.75
0.75

0.75
2.25
Hartley convolution
– Multiplying them by evaluating:

 I (u , v)T (u, v) + I (u , v)T ( N − u , M − v)
NM 

R (u , v) =
+ I ( N − u , M − v)T (u , v)

2 
− I ( N − u , M − v)T ( N − u, M − v)




240-373: Chapter

26
Hartley convolution: Cont’d
585

− 33

45

− 213

− 417

75

− 49

39

− 105

− 11 − 25

45

− 27

Giving:

− 59

25

125

– Performing Inverse Hartley transform, gives:
0

1

4

4

4

20 33 18

36 72 85 38
56 87 97 30

240-373: Chapter

27
Hartley convolution: Cont’d

240-373: Chapter

28
Deconvolution
• Convolution

R = I * T

• Deconvolution I = R *-1 T
• Deconvolution of R by T = convolution of R
• by some ‘inverse’ of the template T (T’)

240-373: Chapter

29
Deconvolution
• Consider periodic convolution as a matrix
operation. For example
1 2 3
4 5 6
7 8 9

1 1 0
*

1 1 0
0 0 0

240-373: Chapter

12 16 14
=

24 28 26
18 22 20

30
Deconvolution
is equivalent to
A
1

1
0

1
(1 2 3 4 5 6 7 8 9) 1

0

0
0

0


B

C

0 1 0 0 0 1 0 1

1 0 0 0 0 1 1 0
1 1 0 0 0 0 1 1

0 1 1 0 1 0 0 0
1 0 1 1 0 0 0 0  = (12 16 14 24 28 26 18 22 20 )

1 1 0 1 1 0 0 0

0 0 1 0 1 1 0 1
0 0 1 1 0 1 1 0

0 0 0 1 1 0 1 1


240-373: Chapter

AB
=C
ABB-1 = CB-1
A
= CB-1

31

More Related Content

What's hot

Overlap save method and overlap add method in dsp
Overlap save method and overlap add method in dspOverlap save method and overlap add method in dsp
Overlap save method and overlap add method in dspchitra raju
 
SIGNAL OPERATIONS
SIGNAL OPERATIONSSIGNAL OPERATIONS
SIGNAL OPERATIONSmihir jain
 
Lecture 14 Properties of Fourier Transform for 2D Signal
Lecture 14 Properties of Fourier Transform for 2D SignalLecture 14 Properties of Fourier Transform for 2D Signal
Lecture 14 Properties of Fourier Transform for 2D SignalVARUN KUMAR
 
Computing DFT using Matrix method
Computing DFT using Matrix methodComputing DFT using Matrix method
Computing DFT using Matrix methodSarang Joshi
 
14 unit tangent and normal vectors
14 unit tangent and normal vectors14 unit tangent and normal vectors
14 unit tangent and normal vectorsmath267
 
4. operations of signals
4. operations of signals 4. operations of signals
4. operations of signals MdFazleRabbi18
 
Admissions in india 2015
Admissions in india 2015Admissions in india 2015
Admissions in india 2015Edhole.com
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015Edhole.com
 
Hermite integrators and 2-parameter subgroup of Riordan group
Hermite integrators and 2-parameter subgroup of Riordan groupHermite integrators and 2-parameter subgroup of Riordan group
Hermite integrators and 2-parameter subgroup of Riordan groupKeigo Nitadori
 
Bolted connection-final
Bolted connection-finalBolted connection-final
Bolted connection-finalmahmoud samir
 
Top schools in delhi ncr
Top schools in delhi ncrTop schools in delhi ncr
Top schools in delhi ncrEdhole.com
 
shooting method with Range kutta method
shooting method with Range kutta methodshooting method with Range kutta method
shooting method with Range kutta methodSetuThacker
 
Fourier Series for Continuous Time & Discrete Time Signals
Fourier Series for Continuous Time & Discrete Time SignalsFourier Series for Continuous Time & Discrete Time Signals
Fourier Series for Continuous Time & Discrete Time SignalsJayanshu Gundaniya
 
Finite elements : basis functions
Finite elements : basis functionsFinite elements : basis functions
Finite elements : basis functionsTarun Gehlot
 
Ece formula sheet
Ece formula sheetEce formula sheet
Ece formula sheetManasa Mona
 

What's hot (19)

Overlap save method and overlap add method in dsp
Overlap save method and overlap add method in dspOverlap save method and overlap add method in dsp
Overlap save method and overlap add method in dsp
 
SIGNAL OPERATIONS
SIGNAL OPERATIONSSIGNAL OPERATIONS
SIGNAL OPERATIONS
 
Lecture 14 Properties of Fourier Transform for 2D Signal
Lecture 14 Properties of Fourier Transform for 2D SignalLecture 14 Properties of Fourier Transform for 2D Signal
Lecture 14 Properties of Fourier Transform for 2D Signal
 
Computing DFT using Matrix method
Computing DFT using Matrix methodComputing DFT using Matrix method
Computing DFT using Matrix method
 
Fourier slide
Fourier slideFourier slide
Fourier slide
 
14 unit tangent and normal vectors
14 unit tangent and normal vectors14 unit tangent and normal vectors
14 unit tangent and normal vectors
 
4. operations of signals
4. operations of signals 4. operations of signals
4. operations of signals
 
Admissions in india 2015
Admissions in india 2015Admissions in india 2015
Admissions in india 2015
 
Admission in india 2015
Admission in india 2015Admission in india 2015
Admission in india 2015
 
Hermite integrators and 2-parameter subgroup of Riordan group
Hermite integrators and 2-parameter subgroup of Riordan groupHermite integrators and 2-parameter subgroup of Riordan group
Hermite integrators and 2-parameter subgroup of Riordan group
 
PPT s05-machine vision-s2
PPT s05-machine vision-s2PPT s05-machine vision-s2
PPT s05-machine vision-s2
 
Bolted connection-final
Bolted connection-finalBolted connection-final
Bolted connection-final
 
Top schools in delhi ncr
Top schools in delhi ncrTop schools in delhi ncr
Top schools in delhi ncr
 
shooting method with Range kutta method
shooting method with Range kutta methodshooting method with Range kutta method
shooting method with Range kutta method
 
Fourier Series for Continuous Time & Discrete Time Signals
Fourier Series for Continuous Time & Discrete Time SignalsFourier Series for Continuous Time & Discrete Time Signals
Fourier Series for Continuous Time & Discrete Time Signals
 
Finite elements : basis functions
Finite elements : basis functionsFinite elements : basis functions
Finite elements : basis functions
 
Dsp lecture vol 1 introduction
Dsp lecture vol 1 introductionDsp lecture vol 1 introduction
Dsp lecture vol 1 introduction
 
Ece formula sheet
Ece formula sheetEce formula sheet
Ece formula sheet
 
MM2020-AV
MM2020-AVMM2020-AV
MM2020-AV
 

Viewers also liked

2011A New Way to Count the Beans
2011A New Way to Count the Beans2011A New Way to Count the Beans
2011A New Way to Count the BeansWCET
 
2010 Exploring online faculty workload
2010 Exploring online faculty workload2010 Exploring online faculty workload
2010 Exploring online faculty workloadWCET
 
Effective coursedesign
Effective coursedesignEffective coursedesign
Effective coursedesignWCET
 
2011Changing contextethicalbehavior634
2011Changing contextethicalbehavior6342011Changing contextethicalbehavior634
2011Changing contextethicalbehavior634WCET
 
2011Challenges and Successess in Faculty Development
2011Challenges and Successess in Faculty Development2011Challenges and Successess in Faculty Development
2011Challenges and Successess in Faculty DevelopmentWCET
 
Process mapping
Process mappingProcess mapping
Process mappingWCET
 
Free range learners
Free range learnersFree range learners
Free range learnersWCET
 

Viewers also liked (7)

2011A New Way to Count the Beans
2011A New Way to Count the Beans2011A New Way to Count the Beans
2011A New Way to Count the Beans
 
2010 Exploring online faculty workload
2010 Exploring online faculty workload2010 Exploring online faculty workload
2010 Exploring online faculty workload
 
Effective coursedesign
Effective coursedesignEffective coursedesign
Effective coursedesign
 
2011Changing contextethicalbehavior634
2011Changing contextethicalbehavior6342011Changing contextethicalbehavior634
2011Changing contextethicalbehavior634
 
2011Challenges and Successess in Faculty Development
2011Challenges and Successess in Faculty Development2011Challenges and Successess in Faculty Development
2011Challenges and Successess in Faculty Development
 
Process mapping
Process mappingProcess mapping
Process mapping
 
Free range learners
Free range learnersFree range learners
Free range learners
 

Similar to Image Processing in the Frequency Domain

Similar to Image Processing in the Frequency Domain (20)

DFT,DCT TRANSFORMS.pdf
DFT,DCT TRANSFORMS.pdfDFT,DCT TRANSFORMS.pdf
DFT,DCT TRANSFORMS.pdf
 
Lect5 v2
Lect5 v2Lect5 v2
Lect5 v2
 
Ch15 transforms
Ch15 transformsCh15 transforms
Ch15 transforms
 
Mathematical tools in dip
Mathematical tools in dipMathematical tools in dip
Mathematical tools in dip
 
Image trnsformations
Image trnsformationsImage trnsformations
Image trnsformations
 
6.frequency domain image_processing
6.frequency domain image_processing6.frequency domain image_processing
6.frequency domain image_processing
 
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
 
Introduction to FEM
Introduction to FEMIntroduction to FEM
Introduction to FEM
 
Fourier transform
Fourier transformFourier transform
Fourier transform
 
Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)
 
Image transforms
Image transformsImage transforms
Image transforms
 
Unit ii
Unit iiUnit ii
Unit ii
 
Fourier transform
Fourier transformFourier transform
Fourier transform
 
imagetransforms1-210417050321.pptx
imagetransforms1-210417050321.pptximagetransforms1-210417050321.pptx
imagetransforms1-210417050321.pptx
 
Popular image restoration technique
Popular image restoration techniquePopular image restoration technique
Popular image restoration technique
 
Digital Image Procesing
Digital Image ProcesingDigital Image Procesing
Digital Image Procesing
 
3 D Graphics
3 D Graphics3 D Graphics
3 D Graphics
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
 
Wavelet transform in two dimensions
Wavelet transform in two dimensionsWavelet transform in two dimensions
Wavelet transform in two dimensions
 
linear transfermation.pptx
linear transfermation.pptxlinear transfermation.pptx
linear transfermation.pptx
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Image Processing in the Frequency Domain

  • 3. The Frequency Domain • Any wave shape can be approximated by a sum of periodic (such as sine and cosine) functions. • a--amplitude of waveform • f-- frequency (number of times the wave repeats itself in a given length) • p--phase (position that the wave starts) • Usually phase is ignored in image processing 240-373: Chapter 3
  • 6. The Hartley Transform • Discrete Hartley Transform (DHT) – The M x N image is converted into a second image (also M x N) – M and N should be power of 2 (e.g. .., 128, 256, 512, etc.) – The basic transform depends on calculating the following for each pixel in the new M x N array 1 H (u , v) = MN M −1 N −1 ∑∑ x =0 y =0   ux vy   ux vy  f ( x, y ) ⋅ cos(2π ) −  + sin( 2π ) −  M N   M N   240-373: Chapter 6
  • 7. The Hartley Transform where f(x,y) is the intensity of the pixel at position (x,y) H(u,v) is the value of element in frequency domain – The results are periodic – The cosine+sine (CAS) term is call “the kernel of the transformation” (or ”basis function”) 240-373: Chapter 7
  • 8. The Hartley Transform • Fast Hartley Transform (FHT) – M and N must be power of 2 – Much faster than DHT – Equation: H (u, v) = { T (u , v) + T ( M − u, v) + T (u , N − v) − T ( M − u , N − v)} / 2 240-373: Chapter 8
  • 9. The Fourier Transform • The Fourier transform – Each element has real and imaginary values – Formula: F (u , v) = ∫∫ f ( x, y )e −2iπ ( ux +vy ) dxdy – f(x,y) is point (x,y) in the original image and F(u,v) is the point (u,v) in the frequency image 240-373: Chapter 9
  • 10. The Fourier Transform • Discrete Fourier Transform (DFT)  ux vy  − 2 iπ  +  1 M −1 N −1 F (u, v) = f ( x, y )e  M N  ∑∑ MN x =0 y =0 – Imaginary part 1 M −1 N −1  ux vy  Fi (u, v) = − f ( x, y ) sin 2π  +  ∑∑ MN x =0 y =0 M N  – Real part 1 Fr (u , v) = MN M −1 N −1 ∑∑ x =0 y =0  ux vy  f ( x, y ) cos 2π  +  M N  – The actual complex result is Fi(u,v) + Fr(u,v) 240-373: Chapter 10
  • 11. Fourier Power Spectrum and Inverse Fourier Transform • Fourier power spectrum F (u , v) = Fr (u , v) 2 + Fi (u , v) 2 • Inverse Fourier Transform 1 f ( x, y ) = MN 240-373: Chapter M −1 N −1 ∑∑ F (u, v)e  ux vy  2 iπ  +  M N  x =0 y =0 11
  • 12. Fourier Power Spectrum and Inverse Fourier Transform • Fast Fourier Transform (FFT) – Much faster than DFT – M and N must be power of 2 – Computation is reduced from M2N2 to MN log2 M . log2 N (~1/1000 times) 240-373: Chapter 12
  • 13. Fourier Power Spectrum and Inverse Fourier Transform • Optical transformation – A common approach to view image in frequency domain A D B C Original image 240-373: Chapter C B D A Transformed image 13
  • 14. Power and Autocorrelation Functions • Power function: [ 1 P (u , v) = F (u , v) = H (u , v) 2 + H (−u ,−v) 2 2 • Autocorrelation function F (u , v) 2 – Inverse Fourier transform of or 1 [ H (u, v) 2 + H (−u,−v) 2 ] – Hartley transform of 2 240-373: Chapter 14 ]
  • 15. Hartley vs Fourier Transform 240-373: Chapter 15
  • 16. Interpretation of the power function 240-373: Chapter 16
  • 17. Applications of Frequency Domain Processing • Convolution in the frequency domain 240-373: Chapter 17
  • 18. Applications of Frequency Domain Processing – useful when the image is larger than 1024x1024 and the template size is greater than 16x16 – Template and image must be the same size 1 1 1 1 ⇒ 1 1 0 0 240-373: Chapter 1 1 0 0 0 0 0 0 0 0 0 0 18
  • 19. – Use FHT or FFT instead of DHT or DFT – Number of points should be kept small – The transform is periodic • zeros must be padded to the image and the template • minimum image size must be (N+n-1) x (M+m-1) 240-373: Chapter 19
  • 20. 0 1 2 0 4 5 6 0 8 9 10 0 0 0 0 0 240-373: Chapter 1 2 0 0 ⊗ 45 58 44 12 7 3 0 0 97 110 76 32 = 0 0 0 0 26 29 10 16 0 0 0 0 3 13 14 0 20
  • 21. – Convolution in frequency domain is “real convolution” Normal convolution 0 1 2 0 4 5 6 1 2 0 0 0 ⊗ 8 9 10 0 0 0 0 0 7 3 0 0 0 0 0 0 45 = 0 0 0 0 58 44 12 97 110 76 32 26 29 10 16 3 13 14 0 Real convolution 0 4 8 0 1 2 0 5 6 0 9 10 0 0 0 0 240-373: Chapter 0 0 ⊗ 0 0 0 0 0 0 0 0 3 2 0 0 1 4 4 0 4 20 33 18 = 7 36 72 85 38 1 56 87 97 30 21
  • 22. Convolution using the Fourier transform Technique 1: Convolution using the Fourier transform USE: To perform a convolution OPERATION: – zero-padding both the image (MxN) and the template (m x n) to the size (N+n-1) x (M+m-1) – Applying FFT to the modified image and template – Multiplying element by element of the transformed image against the transformed template 240-373: Chapter 22
  • 23. Convolution using the Fourier transform OPERATION: (cont’d) – Multiplication is done as follows: F(image) (r1,i1) F(template) F(result) (r2, i2) (r1r2 - i1i2, r1i2+r2i1) i.e. 4 real multiplications and 2 additions – Performing Inverse Fourier transform 240-373: Chapter 23
  • 24. Hartley convolution Technique 2: Hartley convolution USE: To perform a convolution OPERATION: – zero-padding both the image (MxN) and the template (m x n) to the size (N+n-1) x (M+m-1) image 0 1 2 template 0 1 2 0 0 4 5 6 0 8 9 10 0 0 0 0 0 7 3 0 0 0 0 0 0 0 0 0 0 240-373: Chapter 24
  • 25. Hartley convolution – Applying Hartley transform to the modified image and template image template 11.25 2.25 3.75 − 5.25 − 2.25 − 3.75 − 0.75 2.75 3.25 3.25 3.75 0.75 1.25 − 1.75 − 9.75 − 0.25 − 3.25 1.25 - 1.75 - 1.75 - 1.25 - 1.25 - 1.75 - 0.25 - 1.25 - 2.75 240-373: Chapter 25 3.25 1.75 0.75 0.75 0.75 2.25
  • 26. Hartley convolution – Multiplying them by evaluating:  I (u , v)T (u, v) + I (u , v)T ( N − u , M − v) NM   R (u , v) = + I ( N − u , M − v)T (u , v)  2  − I ( N − u , M − v)T ( N − u, M − v)    240-373: Chapter 26
  • 27. Hartley convolution: Cont’d 585 − 33 45 − 213 − 417 75 − 49 39 − 105 − 11 − 25 45 − 27 Giving: − 59 25 125 – Performing Inverse Hartley transform, gives: 0 1 4 4 4 20 33 18 36 72 85 38 56 87 97 30 240-373: Chapter 27
  • 29. Deconvolution • Convolution R = I * T • Deconvolution I = R *-1 T • Deconvolution of R by T = convolution of R • by some ‘inverse’ of the template T (T’) 240-373: Chapter 29
  • 30. Deconvolution • Consider periodic convolution as a matrix operation. For example 1 2 3 4 5 6 7 8 9 1 1 0 * 1 1 0 0 0 0 240-373: Chapter 12 16 14 = 24 28 26 18 22 20 30
  • 31. Deconvolution is equivalent to A 1  1 0  1 (1 2 3 4 5 6 7 8 9) 1  0  0 0  0  B C 0 1 0 0 0 1 0 1  1 0 0 0 0 1 1 0 1 1 0 0 0 0 1 1  0 1 1 0 1 0 0 0 1 0 1 1 0 0 0 0  = (12 16 14 24 28 26 18 22 20 )  1 1 0 1 1 0 0 0  0 0 1 0 1 1 0 1 0 0 1 1 0 1 1 0  0 0 0 1 1 0 1 1  240-373: Chapter AB =C ABB-1 = CB-1 A = CB-1 31