Graphics Reference
In-Depth Information
For the remainder of the chapter, we're motivated by the question, “Suppose
we have incoming light arriving at a sensor, and we want to make an image that
best captures this arriving light for subsequent display or other uses; what should
we store in the image array?” To answer this question, we need to do two things.
• Choose a new basis in which to represent images.
• Understand how convolution “looks” in this new basis.
2
The Fourier transform is how we'll transform images into the new basis. And
in the new basis, convolution of functions becomes multiplication of functions,
which is much easier to understand and reason about.
1
18.9.1 Frequency-Based Synthesis and Analysis
0
2 , 2 ] , which we'll use throughout this chapter; the
letter “H” is mnemonic for “half.” By writing a sum like
1
Consider the interval H =(
1
x )+ 1
f ( x )=cos( 2
π
3 cos( 6
π x ) ,
(18.28)
2
0.5
0
0.5
shown in Figure 18.28, we can produce an even function on that interval (i.e.,
one symmetric about the y -axis). In general, any sum of cosines of various integer
frequencies will be an even function, because each component cosine is even. By
changing how much of each frequency of cosine we mix in, we can get many
different functions.
Figure 18.28: An even function
on the interval H.
1.5
We can, for instance, find a combination of cos( 0 x ) , cos( 2
π
x ) , and cos( 4
π
x )
1
6 )= 0, and f ( 2 )= 0. These constraints are shown
in Figure 18.29; the shaded constraints on the left are there because the function
is even, so its values on the left half of the real line must match those on the right
half of the line.
We write
that satisfies f ( 0 )= 1, f ( 1
/
0.5
0
0.5
1
f ( x )= a cos( 0 x )+ b cos( 2
π
x )+ c cos( 4
π
x ) ,
(18.29)
1.5
−0.5
0
0.5
and then plugging in the constraints, we find that
Figure 18.29: The problem.
1 = f ( 0 )= a + b + c ,
(18.30)
0 = f ( 1
/
6 )= a + b cos(
π/
3 )+ c cos( 2
π/
3 )
(18.31)
1.5
= a + b
/
2
c
/
2, and
(18.32)
0 = f 1
2
= a
1
b + c ,
(18.33)
0.5
from which we can determine that a = 0 and b = c = 1
/
2 (see Figure 18.30).
0
This is easy to generalize: If we're given k constraints on the values of a func-
tion on the non-negative part of the interval I , then we can find a function written
as a linear combination of cos( 0 x ) , cos( 2
0.5
1 ) x ) that satisfies
those constraints. The proof relies on elementary properties of the cosine and sine.
Thus, we can “synthesize” various even functions by summing up cosines of
many frequencies. We can even “direct” our synthesized function to have certain
values at certain points, as in the second example above. We can synthesize odd
functions by summing up sines of various frequencies as well, and by mixing
sines and cosines, we can even synthesize functions that are neither even nor odd.
π
x ) ,
...
, cos( 2
π
( k
1
1.5
0.5
0
0.5
Figure 18.30: The solution.
 
 
 
Search WWH ::




Custom Search