This class implements a perspective transform in two dimensions. Given four source and four
/// destination points, it will compute the transformation implied between them. The code is based
/// directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.
///
TPerspectiveTransform = class sealed
private
a11: Single;
a12: Single;
a13: Single;
a21: Single;
a22: Single;
a23: Single;
a31: Single;
a32: Single;
a33: Single;
function buildAdjoint(): TPerspectiveTransform;
function times(const other: TPerspectiveTransform): TPerspectiveTransform;
public
constructor Create(const a11, a21, a31, a12, a22, a32, a13,
a23, a33: Single);
class function quadrilateralToQuadrilateral(const x0, y0, x1, y1, x2, y2,
x3, y3, x0p, y0p, x1p, y1p, x2p, y2p,
x3p, y3p: Single): TPerspectiveTransform; static;
class function quadrilateralToSquare(x0: Single; y0: Single; x1: Single;
y1: Single; x2: Single; y2: Single; x3: Single; y3: Single)
: TPerspectiveTransform; static;
class function squareToQuadrilateral(const x0, y0, x1, y1, x2, y2,
x3, y3: Single): TPerspectiveTransform; static;
procedure transformPoints(var points: TArray