Graphics Reference
In-Depth Information
relative weight is computed that indicates the amount of influence that feature lines should have on the
pixel. The mapping is used in the source image to locate the source image pixel that corresponds to the
intermediate image pixel. The relative weight is used to average the source image locations generated
by multiple feature lines into a final source image location. This location is used to determine the color
of the intermediate image pixel. This same procedure is used on the destination image to form its inter-
mediate image. These intermediate images are then cross-dissolved to form the final intermediate
image.
Consider the mapping established by a single feature line, defined by two endpoints and oriented
from P 1 to P 2 . In effect, the feature line establishes a local two-dimensional coordinate system ( U , V )
over the image. For example, the first point of the line can be considered the origin. The second point of
the line establishes the unit distance in the positive V -axis direction and scale. A line perpendicular to
this line and of unit length extending to its right (as one stands on the first point and looks toward the
second point) establishes the U -axis direction and scale. The coordinates ( u , v ) of a pixel relative to this
feature line can be found by simply computing the pixel's position relative to the U - and V -axes of a
local coordinate system defined by that feature line. Variable v is the projection of ( P P 1 ) onto the
direction of ( P 2 P 1 ), normalized to the length of ( P 2 P 1 ). u is calculated similarly (see Figure 4.48 ) .
Assume that the points P 1 and P 2 are selected in the intermediate image and used to determine the
( u , v ) coordinates of a pixel. Given the corresponding feature line in the source image defined by the
points Q 1 and Q 2 , a similar two-dimensional coordinate system, ( S , T ), is established. Using the inter-
mediate pixel's u -, v -coordinates relative to the feature line, one can compute its corresponding loca-
tion in the source image ( Figure 4.49 ) .
To transform an image by a single feature line, each pixel of the intermediate image is mapped back
to a source image position according to the equations above. The colors of the source image pixels in
the neighborhood of that position are then used to color in the pixel of the intermediate image (see
Figure 4.50 ) .
V
P 2
v
P
( u, v )
P 1
u
U
FIGURE 4.48
Local coordinate system of a feature in the intermediate image.
 
Search WWH ::




Custom Search