Exercise class 5b
Sampling Theory
Convolution
1
Spring 2009
Convolution
Definition
( f * g )( x) = f (t ) g ( x t )dt
Intuition
f(t) g(t)
g(t) g(xt)
0 x
Spring 2009
Image Synthesis, CGGC, Technion 2
M. BenChen
Computer Science Dept. Technion Page 1
Image Synthesis Convolution
Exercise class 5b
Commutativity of Convolution
( f * g )( x) = ( g * f )( x)
Intuition
f(t) g(t)
f*g g*f
Spring 2009
Image Synthesis, CGGC, Technion 3
g (u ) f ( x u ) du =
( g * f )( x )
Spring 2009
Image Synthesis, CGGC, Technion 4
M. BenChen
Computer Science Dept. Technion Page 2
Image Synthesis Convolution
Exercise class 5b
Example 1
W  W2 t W2
f (t ) = 2
W/2
t 0 t W2
g (t ) = W/2
0 otherwise
( f * g )( x ) =
f ( t ) g ( x t ) dt
Spring 2009
Image Synthesis, CGGC, Technion 5
Example 1 (cont.)
W/2
W/2
W x < 0 W/2
x
W/2
2
W/2
0 x<W W/2
x
W/2
2
W/2
W x <W x
W/2 W/2
2
Spring 2009
Image Synthesis, CGGC, Technion 6
M. BenChen
Computer Science Dept. Technion Page 3
Image Synthesis Convolution
Exercise class 5b
Example 1 (cont.)
W
0 x<
2
W 2
x+
W 2

W
x<0
2 2 2
2
W
W
2 W
( f * g )( x) = 0 x<
2 2 2
W 2 2
W
x W/2 W/2 W
W
2 2 W
x <W
2 2 2 2
0 Wx
Spring 2009
Image Synthesis, CGGC, Technion 7
f f
f ( x x0 ) f ( x x0 )
Spring 2009
Image Synthesis, CGGC, Technion 8
M. BenChen
Computer Science Dept. Technion Page 4
Image Synthesis Convolution
Exercise class 5b
Example 3  Comb
The comb function: Cl ( x) = (x
j =
jl )
Cl
f
f * Cl
Spring 2009
Image Synthesis, CGGC, Technion 9
f ( x) * Cl ( x) =
f ( x) * (x
j =
jl ) =
j =
f ( x ) * ( x jl ) =
j =
f ( x jl )
Spring 2009
Image Synthesis, CGGC, Technion 10
M. BenChen
Computer Science Dept. Technion Page 5
Image Synthesis Convolution
Exercise class 5b
Example 4
The first order BSpline basis function:
1 + t 1 t < 0
B1 = 1 t 0 t <1
0  t > 1 1 0 1
A sampled function
f (t ) t = ti = i 1
f ( t ) =
0 otherwise ti1 ti ti+1 ti+2
Spring 2009
Image Synthesis, CGGC, Technion 11
Example 4 (cont.)
At the sampled points ( f * B1 )( xi ) = f ( xi )
1 1
x x
xi1 xi xi+1 xi+2 xi1 xi xi+1 xi+2
Spring 2009
Image Synthesis, CGGC, Technion 12
M. BenChen
Computer Science Dept. Technion Page 6
Image Synthesis Convolution
Exercise class 5b
Example 4 (cont.)
For x [xi, xi+1):
( f * B1 )( x ) = 1
xi1 xi
x
xi+1 xi+2
f ( t ) B1 ( x t ) dt =
f ( xi ) B1 ( xi x ) + f ( x i +1 ) B1 ( x i +1 x ) =
((1 + xi x ) f ( x i ) + ((1 xi +1 + x ) f ( xi +1 ) =
(1 ( x x i )) f ( xi ) + (1 xi 1 + x ) f ( xi +1 ) =
(1 t ) f ( x ) + t f ( x ),
i i +1 t = ( x x ) [0, 1) i
Spring 2009
Image Synthesis, CGGC, Technion 13
Example 5
Let f be a discrete function obtained by sampling a
continuous function f.
f (t ) t = t i = il , i Z , l > 0
f ( t ) =
0 otherwise
Spring 2009
Image Synthesis, CGGC, Technion 14
M. BenChen
Computer Science Dept. Technion Page 7
Image Synthesis Convolution
Exercise class 5b
Example 5 (cont.)
( f * sinc)( x ) = f (t ) sinc( x t ) dt =
i =
f ( t i ) sinc( x t i )
Spring 2009
Image Synthesis, CGGC, Technion 15
Example 5 (cont.)
Sinc is infinite f ( t i )
Truncate to get a finite number of points
For 9 points:
f(0.3) = 0.2388
Approximated = 0.2546
= 0.2546
Spring 2009
Image Synthesis, CGGC, Technion 16
M. BenChen
Computer Science Dept. Technion Page 8
Image Synthesis Convolution
Exercise class 5b
Example 5 (cont.)
The convolution is defined for any x
The resulting function is defined over the continuous domain
In this example
f ( x i ) * sinc= f ( x )
To be continued
* =
Spring 2009
Image Synthesis, CGGC, Technion 17
M. BenChen
Computer Science Dept. Technion Page 9