Graphics Reference
In-Depth Information
use x -coordinates
of these points
Source image grid
Intermediate grid
use y -coordinates
of these points
source image grid point
auxiliary
grid point
intermediate
grid point
Auxiliary grid
Details showing relationship of source image grid point,
intermediate grid point, and auxiliary grid point
FIGURE 4.44
Formation of auxiliary grid for two-pass warping of source image to intermediate grid.
auxiliary grid, a cubic Catmull-Rom spline is defined in pixel coordinates. The leftmost and rightmost
columns define straight lines down the sides of the images; this is necessary to include the entire image
in the warping process. See the top of Figure 4.45 . For each scanline, the x -intercepts of the curves with
the scanline are computed. These define a grid coordinate system on the scanline. The position of each
pixel on the scanline in the source image is determined relative to the x -intercepts by computing the
Catmull-Rom spline passing through the two-dimensional space of the (grid index, x -intercept) pairs.
See the middle of Figure 4.45 . The integer values of x
1/2, representing the pixel boundaries, can then
be located in this space and the fractional index value recorded. In the auxiliary image, the x -intercepts
of the curves with the scanline are also computed, and for the corresponding scanline, the source image
pixel boundaries can be mapped into the intermediate image by using their fractional indices and locat-
ing their x -positions in the auxiliary scanline. See the bottom of Figure 4.45 . Once this is complete, the
color of the source image pixel can be used to color in auxiliary pixels by using fractional coverage to
affect anti-aliasing.
The result of the first phase generates colored pixels of an auxiliary image by averaging source
image pixel colors on a scanline-by-scanline basis. The second phase repeats the same process on a
 
Search WWH ::




Custom Search