Menu

## PerspectiveTransform
in package

PerspectiveTransform.php : 23

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.

##### Tags

author

  Sean Owen

### Table of Contents

$a11 : float
$a12 : float
$a13 : float
$a21 : float
$a22 : float
$a23 : float
$a31 : float
$a32 : float
$a33 : float
quadrilateralToQuadrilateral() : self
transformPoints() : void
buildAdjoint() : self
quadrilateralToSquare() : self
set() : self
squareToQuadrilateral() : self
times() : self

### Properties

#### $a11

PerspectiveTransform.php : 25
`private float $a11`

#### $a12

PerspectiveTransform.php : 26
`private float $a12`

#### $a13

PerspectiveTransform.php : 27
`private float $a13`

#### $a21

PerspectiveTransform.php : 28
`private float $a21`

#### $a22

PerspectiveTransform.php : 29
`private float $a22`

#### $a23

PerspectiveTransform.php : 30
`private float $a23`

#### $a31

PerspectiveTransform.php : 31
`private float $a31`

#### $a32

PerspectiveTransform.php : 32
`private float $a32`

#### $a33

PerspectiveTransform.php : 33
`private float $a33`

### Methods

#### quadrilateralToQuadrilateral()

PerspectiveTransform.php : 59
`public quadrilateralToQuadrilateral(float $x0, float $y0, float $x1, float $y1, float $x2, float $y2, float $x3, float $y3, float $x0p, float $y0p, float $x1p, float $y1p, float $x2p, float $y2p, float $x3p, float $y3p) : self`

##### Parameters

$x0 : float
$y0 : float
$x1 : float
$y1 : float
$x2 : float
$y2 : float
$x3 : float
$y3 : float
$x0p : float
$y0p : float
$x1p : float
$y1p : float
$x2p : float
$y2p : float
$x3p : float
$y3p : float

##### Return values

self —

#### transformPoints()

PerspectiveTransform.php : 149
`public transformPoints(array<string|int, mixed> &$xValues[, array<string|int, mixed> &$yValues = null ]) : void`

##### Parameters

$xValues : array<string|int, mixed>
$yValues : array<string|int, mixed> = null

##### Return values

void —

#### buildAdjoint()

PerspectiveTransform.php : 84
`private buildAdjoint() : self`

##### Return values

self —

#### quadrilateralToSquare()

PerspectiveTransform.php : 71
`private quadrilateralToSquare(float $x0, float $y0, float $x1, float $y1, float $x2, float $y2, float $x3, float $y3) : self`

##### Parameters

$x0 : float
$y0 : float
$x1 : float
$y1 : float
$x2 : float
$y2 : float
$x3 : float
$y3 : float

##### Return values

self —

#### set()

PerspectiveTransform.php : 38
`private set(float $a11, float $a21, float $a31, float $a12, float $a22, float $a32, float $a13, float $a23, float $a33) : self`

##### Parameters

$a11 : float
$a21 : float
$a31 : float
$a12 : float
$a22 : float
$a32 : float
$a13 : float
$a23 : float
$a33 : float

##### Return values

self —

#### squareToQuadrilateral()

PerspectiveTransform.php : 102
`private squareToQuadrilateral(float $x0, float $y0, float $x1, float $y1, float $x2, float $y2, float $x3, float $y3) : self`

##### Parameters

$x0 : float
$y0 : float
$x1 : float
$y1 : float
$x2 : float
$y2 : float
$x3 : float
$y3 : float

##### Return values

self —

#### times()

PerspectiveTransform.php : 132
`private times(PerspectiveTransform $other) : self`

##### Parameters

$other : PerspectiveTransform

##### Return values

self —

## Search results