Graphics Reference
In-Depth Information
further than required by the pure theory. The precise tuning of filter choices
remains something of a dark art.
Digital signal processing, like the edge detection, blurring, and sharpening
mentioned in this chapter, is a rich field. Oppenheim and Schafer's book [OS09]
is a standard introduction. Many of the obvious techniques don't work very well in
practice. Our example of edge detection and gradient finding with the Mona Lisa
was carefully applied to a blurred version of the image, because the unblurred
version generated many edges and the gradients appeared random. Such tricks
form an essential part of the tool set of anyone who works with image data.
19.8 Exercises
Exercise 19.1: Suppose you're building a ray tracer and you want to build a
100
100 grid on the image plane. The image plane has uv -coordinates on it, and
the image rectangle ranges from
×
2 to 2 in u and v . Where should you place your
samples? Consider the one-dimensional problem instead: We need 100 samples
between u =
1
1
2
and u = 2 . One choice is u i =
1
2 +( i
/
99 ) , i = 0,
...
, 99.
2 to u 99 = 2 . The other natural choice is to space
the points evenly so that they are separated by 1
1
These points range from u 0 =
1
/
100, that is, u i =
2 +( i
/
100 )+
( 1
200 ) .
(a) Suppose that instead of 100 points, you want N = 3 points. Plot the u i for each
method.
(b) Do the same for N = 2 and N = 1.
(c) Imagine that instead of 100 points ranging from
/
1
2
1
to
2 , you wanted 200
points ranging from
1 to 1. You might expect the “middle” 100 points from this
wider problem to correspond to your 100 points for the narrower problem. Which
formula has that property?
Exercise 19.2: One favorite filter is the Gaussian, defined by g ( x , y )=
Ce −π ( x 2 + y 2 ) . It has three important properties. First, it is its own Fourier trans-
form. Second, it's circularly symmetric: Its value on the circle of radius r around
the origin is constant. Third, it's a product of two one-dimensional filters. Do the
algebra to show the second and third properties.
Exercise 19.3: The cubic spline filter B can be conver ted into a circu-
larly symmetric filter on the plane by saying B ( x , y )= B ( x 2 + y 2 ) . Unfor-
tunately, this circularly symmetric filter is not separable. The separable filter
C ( x , y )= B ( x ) B ( y ) built from B is not circularly s y mmetric. How different are
they? Numerically estimate the integral of C ( x , y )
B ( x , y ) over the plane.
Exercise 19.4: Apply the unrippling approach, with the missing-weights
modification, on the cubic B-spline filter, applied to scaling up a signal by a factor
of 10.
(a) Apply the technique to a ten-sample signal where every sample value is 1.
(b) Apply it to a ten-sample signal where sample i is cos(
π
ki
/
20 ) for k = 1, 4,
and 9. Comment on the results.
Exercise 19.5: Here's an alternative approach to reconstructing a band-limited
signal from its samples.
(a) Argue why the operation must be well defined (i.e., why there is exactly one
signal in L 2 ( R ) , band-limited at
v 0 = 2 , with any particular set of values on the
integers).
(b) Argue that reconstruction must be linear, that is, if f i : R
R is the reconstruc-
tion of the discrete signal s i : Z
R for i = 1, 2, then f 1 + f 2 is the reconstruction
of the discrete signal s 1 + s 2 .
 
 
Search WWH ::




Custom Search