Upload
truongbao
View
221
Download
3
Embed Size (px)
Citation preview
Convolution
Computational Photography WS 07/08Image Processing Basics
Björn Bollensdorff – [email protected]
Overview
• Introduction (multiplication)• Discrete convolution• Continuous convolution• Properties• Filter• Excursion: frequency domain• 2D Convolution
Multiplication
• using a simpleroperation to generate ahigher order operation
• multiple summations• general formula
Introduction
Doing the same with functions
• Applying theoperations on eachvalue separated
• The result is afunction
Introduction
Multiplication and addition oftwo functions
f1+f2 f1• f2
Introduction
Convolution
• Operation that uses addition and multiplication• result is a function• It is a way to combine to functions• It is like weighting one function with the other• Flipping one function and then summing up the
products for each positions for a given offset n
Discrete Convolution
Flipping the function
f2(-k)
Discrete Convolution
Multiply and add
Discrete Convolution
Multiply and add
1•1 =1
Discrete Convolution
Multiply and add
1•3 + 2•1 =5
Discrete Convolution
Multiply and add
1•1 + 2•3 + 1•1 = 8
Discrete Convolution
Multiply and add
1•2 + 2•1 + 1•3 + 2•1 = 9
Discrete Convolution
Multiply and add
2•2 + 1•1 + 2•3 = 11
Discrete Convolution
Multiply and add
1•2 + 2•1 = 4
Discrete Convolution
Multiply and add
2•2 = 4
Discrete Convolution
Multiply and add
Discrete Convolution
Result
final length = length(f1(n)) + length(f2(n)) - 1
Discrete Convolution
ComparisonCrosscorrelationConvolution
Discrete Convolution
Continuous Convolution
• Summation becomes an integral
Continuous Convolution
Properties
• Commutative
• Associative
• Distributive
Properties
Filter
• signal y(n) is aconvolution of u(n)with the Transferfunction h(n)
• Filtering can be doneby the convolution oftwo signals
Filter
Excursion Frequency Domain
• Another representation of the same signal• Shows of which frequencies the signal consists• Frequency in images represents the intensity
changes
Excursion
Discrete Fourier Transformation
Example Rectangle Function
• the rectanglefunction in thespatial domainbecomes a sinc in thefrequency domain
• two overlaid sincs
Excursion
Example Lena
picture 1 picture 2
Excursion
Convolution Theorem
Convolution in spatial domain becomesmultiplication in frequency domain
Fast convolution using FFT
Properties
Derivation of the theorem
Properties
2D-Convolution
• We can do it in 2D too• usually one function is a small one and called
(convolution) kernel• sometimes only the cross correlation is used
2D-Convolution
What should we do with theborder?
• different approaches• ignore them ⇒ image gets smaller• suppose they are black• mirror the border• suppose the image continuous with the
last pixels
2D-Convolution
Example finding edges
10-120-210-1
Differentiating to find the steep parts of the picture
121000-1-2-1
2D-Convolution
Example Simple NoiseReduction
• cutting of the high frequency noise by low passfiltering with a sinc like kernel
• for not changing the aspect of the image thesum of the kernel must be 1
111151111
1/13
2D-Convolution
Sources
• Noll, P. Script (1999) Signale und Systeme. TU Berlin• Noll, P. Script (WS 2006/7) Nachrichten Übertragung I TU
Berlin• Albiol, A., Naranjo, V., Prades J., Tratamiento digital de la
señal, teoría y aplicaciones. Universidad Politécnica deValencia
• Picture 1, 2:http://www.vis.ne.jp/mt/archives/000680.html
• Applet: http://www.jhu.edu/~signals/convolve/index.html• Proof:
http://mathworld.wolfram.com/ConvolutionTheorem.html
Sources