SlideShare a Scribd company logo
1 of 34
Convolution
CS474/674 – Prof. Bebis
Section 3.4, 4.2
Correlation - Review
Output
Image
/2 /2
/2 /2
( , ) ( , ) ( , ) ( , ) ( , )
K K
s K t K
g x y w x y f x y w s t f x s y t
 
    
 
K x K
Convolution – Review
• Same as correlation except that the mask is flipped both
horizontally and vertically.
• Note that if w(x,y) is symmetric, that is w(x,y)=w(-x,-y),
then convolution is equivalent to correlation!
/2 /2
/2 /2
( , ) ( , ) ( , ) ( , ) ( , )
K K
s K t K
g x y w x y f x y w s t f x s y t
 
    
 
1D Continuous Convolution
• Convolution is defined as follows:
• Convolution is commutative:
Think of f(x) as the
image and g(x) as the
mask although you can
reverse their roles!
1. Flip g(a)  g(-a)
2. Shift g(x-a)
3. Compute area overlap
f(a)g(x-a)
x
  
Example 1
Example 2
• Compute the convolution of the following two
functions:
Example 2 (cont’d)
x-1
Example 2 (cont’d)
Step 3: Compute the integral for x
  
Example 2 (cont’d)
Important Observations
• The extent of f(x) * g(x) is equal to the extent of f(x)
plus the extent of g(x)
extent = 1 extent = 1
extent = 2
Important Observations (cont’d)
• For every x, the limits of the integral are determined
as follows:
– Lower limit: MAX (left limit of f(x), left limit of g(x-a))
– Upper limit: MIN (right limit of f(x), right limit of g(x-a))
Example 3
α α
width = 2 width = 3
Example 3 (cont’d)
Example 3 (cont’d)
Convolution with an impulse
(i.e., delta function)
Convolution with an “train” of impulses
=
Convolution Theorem
• Convolution in the spatial domain is equivalent to
multiplication in the frequency domain.
• Multiplication in the spatial domain is equivalent to
convolution in the frequency domain.
f(x) F(u)
g(x) G(u)
Efficient computation of (f * g)
• 1. Compute and
• 2. Multiply them:
• 3. Compute the inverse FT:
We will later analyze computational complexity!
(i.e., element-wise
complex multiplication)
Discrete Convolution
• Replace integral with summation
• Integration variable becomes an index.
• Displacements take place in discrete increments
Example
5 samples 3 samples
f(m) g(m)
-1 0 1
-2 -1 0 1 2
1 1
*
Example (cont’d)
f(m) g(m)
-1 0 1
-2 -1 0 1 2
1 1
-1 0 1
1
-1 0 1
1
g(-m)
g(x-m)
x
Compute the convolution
assuming discrete values
for x,
Example (cont’d)
-4 -3 -2 -1 0 1 2
1
x
4 4
x or x
   
-3 -2 -1 0 1 2
1
x
3
x  
f *g = 0
f *g = 1
no overlap
Note that I show some
red samples “taller” for clarity!
Example (cont’d)
-2 -1 0 1 2
1
x
2
x  
1
x  
f *g = 2
f *g = 3
-2 -1 0 1 2
1
x
Example (cont’d)
0
x 
1
x 
f *g = 3
f *g = 3
-2 -1 0 1 2
1
x
-2 -1 0 1 2
1
x
Example (cont’d)
2
x 
3
x 
f *g = 2
f *g = 1
-2 -1 0 1 2 3 4
1
x
-2 -1 0 1 2 3
1
x
4
x  f *g = 0
no overlap
Example
5 samples 3 samples
f(m) g(m)
-1 0 1
1 1
* =
7 samples
-3 -2 -1 0 1 2 3
2
1
-2 -1 0 1 2
length of f*g = length of f + length of g - 1
3
Convolution Theorem in Discrete Case
• Input sequences:
• Length of f*g sequence is: M=A+B-1
• Extended input sequences: make them length M by
padding with zeroes:
Convolution Theorem in Discrete Case
(cont’d)
• When dealing with discrete convolution, the
convolution theorem holds true for the extended
sequences only!
Note: in general, we can form fe(x) and ge(x) using:
element-wise
complex multiplication
Why do we need to consider the
extended sequences ?
Continuous case Discrete case
The discrete convolution is
periodic (with period
M=A+B-1) since DFT is
periodic
Why do we need to consider the
extended sequences ? (cont’d)
If M<A+B-1, the periods move
closer to each other (overlap)
If M>A+B-1, the periods move
away from each other (no overlap)
Optimum:
M=A+B-1
2D Convolution
• Definition
• 2D convolution theorem element-wise
complex multiplication
Discrete 2D convolution
• Suppose f(x,y) is A x B and g(x,y) is C x D
• The size of f(x,y) * g(x,y) would be N x M where
N=A+C-1 and M=B+D-1
• Form extended images (i.e., pad with zeroes):
Discrete 2D convolution (cont’d)
• The convolution theorem holds true for the extended
images only!
( , )* ( , ) ( , ) ( , )
e e e e
f x y g x y F u v G u v
  
Example

More Related Content

Similar to Convolution.ppt

Integration
IntegrationIntegration
Integrationsuefee
 
8 arc length and area of surfaces x
8 arc length and area of surfaces x8 arc length and area of surfaces x
8 arc length and area of surfaces xmath266
 
MATHLECT1LECTUREFFFFFFFFFFFFFFFFFFHJ.pdf
MATHLECT1LECTUREFFFFFFFFFFFFFFFFFFHJ.pdfMATHLECT1LECTUREFFFFFFFFFFFFFFFFFFHJ.pdf
MATHLECT1LECTUREFFFFFFFFFFFFFFFFFFHJ.pdfHebaEng
 
DIFFERENTIATION Integration and limits (1).pptx
DIFFERENTIATION Integration and limits (1).pptxDIFFERENTIATION Integration and limits (1).pptx
DIFFERENTIATION Integration and limits (1).pptxOchiriaEliasonyait
 
Difference quotient algebra
Difference quotient algebraDifference quotient algebra
Difference quotient algebramath260
 
fouriertransform.pdf
fouriertransform.pdffouriertransform.pdf
fouriertransform.pdfssuser4dafea
 
The Multivariate Gaussian Probability Distribution
The Multivariate Gaussian Probability DistributionThe Multivariate Gaussian Probability Distribution
The Multivariate Gaussian Probability DistributionPedro222284
 
MA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docx
MA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docxMA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docx
MA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docxinfantsuk
 
2.3 slopes and difference quotient t
2.3 slopes and difference quotient t2.3 slopes and difference quotient t
2.3 slopes and difference quotient tmath260
 
Module 2 linear functions
Module 2   linear functionsModule 2   linear functions
Module 2 linear functionsdionesioable
 
Rate of change and tangent lines
Rate of change and tangent linesRate of change and tangent lines
Rate of change and tangent linesMrs. Ibtsam Youssef
 
The Application of Derivatives
The Application of DerivativesThe Application of Derivatives
The Application of Derivativesdivaprincess09
 
Unit vii
Unit viiUnit vii
Unit viimrecedu
 
Module 4 circular function
Module 4   circular functionModule 4   circular function
Module 4 circular functiondionesioable
 

Similar to Convolution.ppt (20)

Integration
IntegrationIntegration
Integration
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
8 arc length and area of surfaces x
8 arc length and area of surfaces x8 arc length and area of surfaces x
8 arc length and area of surfaces x
 
Ch07
Ch07Ch07
Ch07
 
exponen dan logaritma
exponen dan logaritmaexponen dan logaritma
exponen dan logaritma
 
The integral
The integralThe integral
The integral
 
Evaluating definite integrals
Evaluating definite integralsEvaluating definite integrals
Evaluating definite integrals
 
MATHLECT1LECTUREFFFFFFFFFFFFFFFFFFHJ.pdf
MATHLECT1LECTUREFFFFFFFFFFFFFFFFFFHJ.pdfMATHLECT1LECTUREFFFFFFFFFFFFFFFFFFHJ.pdf
MATHLECT1LECTUREFFFFFFFFFFFFFFFFFFHJ.pdf
 
DIFFERENTIATION Integration and limits (1).pptx
DIFFERENTIATION Integration and limits (1).pptxDIFFERENTIATION Integration and limits (1).pptx
DIFFERENTIATION Integration and limits (1).pptx
 
Difference quotient algebra
Difference quotient algebraDifference quotient algebra
Difference quotient algebra
 
fouriertransform.pdf
fouriertransform.pdffouriertransform.pdf
fouriertransform.pdf
 
The Multivariate Gaussian Probability Distribution
The Multivariate Gaussian Probability DistributionThe Multivariate Gaussian Probability Distribution
The Multivariate Gaussian Probability Distribution
 
MA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docx
MA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docxMA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docx
MA 243 Calculus III Fall 2015 Dr. E. JacobsAssignmentsTh.docx
 
2.3 slopes and difference quotient t
2.3 slopes and difference quotient t2.3 slopes and difference quotient t
2.3 slopes and difference quotient t
 
Module 2 linear functions
Module 2   linear functionsModule 2   linear functions
Module 2 linear functions
 
Rate of change and tangent lines
Rate of change and tangent linesRate of change and tangent lines
Rate of change and tangent lines
 
The Application of Derivatives
The Application of DerivativesThe Application of Derivatives
The Application of Derivatives
 
Unit vii
Unit viiUnit vii
Unit vii
 
Functions
FunctionsFunctions
Functions
 
Module 4 circular function
Module 4   circular functionModule 4   circular function
Module 4 circular function
 

Recently uploaded

Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...Bertram Ludäscher
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Klinik kandungan
 
Huawei Ransomware Protection Storage Solution Technical Overview Presentation...
Huawei Ransomware Protection Storage Solution Technical Overview Presentation...Huawei Ransomware Protection Storage Solution Technical Overview Presentation...
Huawei Ransomware Protection Storage Solution Technical Overview Presentation...LuisMiguelPaz5
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...yulianti213969
 
sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444saurabvyas476
 
Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?RemarkSemacio
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
Seven tools of quality control.slideshare
Seven tools of quality control.slideshareSeven tools of quality control.slideshare
Seven tools of quality control.slideshareraiaryan448
 
DAA Assignment Solution.pdf is the best1
DAA Assignment Solution.pdf is the best1DAA Assignment Solution.pdf is the best1
DAA Assignment Solution.pdf is the best1sinhaabhiyanshu
 
Capstone in Interprofessional Informatic // IMPACT OF COVID 19 ON EDUCATION
Capstone in Interprofessional Informatic  // IMPACT OF COVID 19 ON EDUCATIONCapstone in Interprofessional Informatic  // IMPACT OF COVID 19 ON EDUCATION
Capstone in Interprofessional Informatic // IMPACT OF COVID 19 ON EDUCATIONLakpaYanziSherpa
 
DS Lecture-1 about discrete structure .ppt
DS Lecture-1 about discrete structure .pptDS Lecture-1 about discrete structure .ppt
DS Lecture-1 about discrete structure .pptTanveerAhmed817946
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteedamy56318795
 
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...ThinkInnovation
 
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...Klinik Aborsi
 
Bios of leading Astrologers & Researchers
Bios of leading Astrologers & ResearchersBios of leading Astrologers & Researchers
Bios of leading Astrologers & Researchersdarmandersingh4580
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxronsairoathenadugay
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样jk0tkvfv
 

Recently uploaded (20)

Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
Huawei Ransomware Protection Storage Solution Technical Overview Presentation...
Huawei Ransomware Protection Storage Solution Technical Overview Presentation...Huawei Ransomware Protection Storage Solution Technical Overview Presentation...
Huawei Ransomware Protection Storage Solution Technical Overview Presentation...
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
 
sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444
 
Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Seven tools of quality control.slideshare
Seven tools of quality control.slideshareSeven tools of quality control.slideshare
Seven tools of quality control.slideshare
 
DAA Assignment Solution.pdf is the best1
DAA Assignment Solution.pdf is the best1DAA Assignment Solution.pdf is the best1
DAA Assignment Solution.pdf is the best1
 
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotecAbortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
 
Capstone in Interprofessional Informatic // IMPACT OF COVID 19 ON EDUCATION
Capstone in Interprofessional Informatic  // IMPACT OF COVID 19 ON EDUCATIONCapstone in Interprofessional Informatic  // IMPACT OF COVID 19 ON EDUCATION
Capstone in Interprofessional Informatic // IMPACT OF COVID 19 ON EDUCATION
 
DS Lecture-1 about discrete structure .ppt
DS Lecture-1 about discrete structure .pptDS Lecture-1 about discrete structure .ppt
DS Lecture-1 about discrete structure .ppt
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
 
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
 
Abortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Jeddah |+966572737505 | get cytotecAbortion pills in Jeddah |+966572737505 | get cytotec
Abortion pills in Jeddah |+966572737505 | get cytotec
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Bios of leading Astrologers & Researchers
Bios of leading Astrologers & ResearchersBios of leading Astrologers & Researchers
Bios of leading Astrologers & Researchers
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
 

Convolution.ppt

  • 1. Convolution CS474/674 – Prof. Bebis Section 3.4, 4.2
  • 2. Correlation - Review Output Image /2 /2 /2 /2 ( , ) ( , ) ( , ) ( , ) ( , ) K K s K t K g x y w x y f x y w s t f x s y t          K x K
  • 3. Convolution – Review • Same as correlation except that the mask is flipped both horizontally and vertically. • Note that if w(x,y) is symmetric, that is w(x,y)=w(-x,-y), then convolution is equivalent to correlation! /2 /2 /2 /2 ( , ) ( , ) ( , ) ( , ) ( , ) K K s K t K g x y w x y f x y w s t f x s y t         
  • 4. 1D Continuous Convolution • Convolution is defined as follows: • Convolution is commutative: Think of f(x) as the image and g(x) as the mask although you can reverse their roles! 1. Flip g(a)  g(-a) 2. Shift g(x-a) 3. Compute area overlap f(a)g(x-a) x   
  • 6. Example 2 • Compute the convolution of the following two functions:
  • 8. Example 2 (cont’d) Step 3: Compute the integral for x   
  • 10. Important Observations • The extent of f(x) * g(x) is equal to the extent of f(x) plus the extent of g(x) extent = 1 extent = 1 extent = 2
  • 11. Important Observations (cont’d) • For every x, the limits of the integral are determined as follows: – Lower limit: MAX (left limit of f(x), left limit of g(x-a)) – Upper limit: MIN (right limit of f(x), right limit of g(x-a))
  • 12. Example 3 α α width = 2 width = 3
  • 15. Convolution with an impulse (i.e., delta function)
  • 16. Convolution with an “train” of impulses =
  • 17. Convolution Theorem • Convolution in the spatial domain is equivalent to multiplication in the frequency domain. • Multiplication in the spatial domain is equivalent to convolution in the frequency domain. f(x) F(u) g(x) G(u)
  • 18. Efficient computation of (f * g) • 1. Compute and • 2. Multiply them: • 3. Compute the inverse FT: We will later analyze computational complexity! (i.e., element-wise complex multiplication)
  • 19. Discrete Convolution • Replace integral with summation • Integration variable becomes an index. • Displacements take place in discrete increments
  • 20. Example 5 samples 3 samples f(m) g(m) -1 0 1 -2 -1 0 1 2 1 1 *
  • 21. Example (cont’d) f(m) g(m) -1 0 1 -2 -1 0 1 2 1 1 -1 0 1 1 -1 0 1 1 g(-m) g(x-m) x Compute the convolution assuming discrete values for x,
  • 22. Example (cont’d) -4 -3 -2 -1 0 1 2 1 x 4 4 x or x     -3 -2 -1 0 1 2 1 x 3 x   f *g = 0 f *g = 1 no overlap Note that I show some red samples “taller” for clarity!
  • 23. Example (cont’d) -2 -1 0 1 2 1 x 2 x   1 x   f *g = 2 f *g = 3 -2 -1 0 1 2 1 x
  • 24. Example (cont’d) 0 x  1 x  f *g = 3 f *g = 3 -2 -1 0 1 2 1 x -2 -1 0 1 2 1 x
  • 25. Example (cont’d) 2 x  3 x  f *g = 2 f *g = 1 -2 -1 0 1 2 3 4 1 x -2 -1 0 1 2 3 1 x 4 x  f *g = 0 no overlap
  • 26. Example 5 samples 3 samples f(m) g(m) -1 0 1 1 1 * = 7 samples -3 -2 -1 0 1 2 3 2 1 -2 -1 0 1 2 length of f*g = length of f + length of g - 1 3
  • 27. Convolution Theorem in Discrete Case • Input sequences: • Length of f*g sequence is: M=A+B-1 • Extended input sequences: make them length M by padding with zeroes:
  • 28. Convolution Theorem in Discrete Case (cont’d) • When dealing with discrete convolution, the convolution theorem holds true for the extended sequences only! Note: in general, we can form fe(x) and ge(x) using: element-wise complex multiplication
  • 29. Why do we need to consider the extended sequences ? Continuous case Discrete case The discrete convolution is periodic (with period M=A+B-1) since DFT is periodic
  • 30. Why do we need to consider the extended sequences ? (cont’d) If M<A+B-1, the periods move closer to each other (overlap) If M>A+B-1, the periods move away from each other (no overlap) Optimum: M=A+B-1
  • 31. 2D Convolution • Definition • 2D convolution theorem element-wise complex multiplication
  • 32. Discrete 2D convolution • Suppose f(x,y) is A x B and g(x,y) is C x D • The size of f(x,y) * g(x,y) would be N x M where N=A+C-1 and M=B+D-1 • Form extended images (i.e., pad with zeroes):
  • 33. Discrete 2D convolution (cont’d) • The convolution theorem holds true for the extended images only! ( , )* ( , ) ( , ) ( , ) e e e e f x y g x y F u v G u v   