7.3.10. Computing Image Warping Maps

compute displacement tables for 2D geometric transformations of images, such as bilinear warps that transform any quadrilateral into any rectangle. (compute-bilin-transform dispi dispj x1 y1 x2 y2 x3 y3 x4 y4 p1 q1 p3 q3)

((-idx2- (-int-)) dispi):
((-idx2- (-int-)) dispj):
((-flt-) x1 y1 x2 y2 x3 y3 x4 y4 p1 q1 p3 q3):
SIDE EFFECTS: <dispi> <dispj>
Tabulates a bilinear transformation that maps the quadrilateral defined
by the <xi> <yi> to a rectangle whose upper left point is <p1> <q1> and
lower right point is <p3> <q3>.
<x1> <y1> is the upper left point on the quadrilateral, and the points
are numbered clockwise.
<dispi> and <dispj> must be idx2 of int. On output, element (i,j)
of <dispi> and <dispj> will be filled respectively with the abscissa
and ordinate of the point in the quadrilateral that maps to point (i,j).
Values in these idx2 are interpreted as 32bit fixed point numbers
with 16 bit integer part and 16 bit fractional part.
<dispi> and <dispj> can subsequently be used as input to 
warp-shimage, or warp-shimage-fast.
This function makes minimal use of floating point arithmetics.