Skip to main content

perspective_transform

Function perspective_transform 

Source
pub fn perspective_transform(
    source: &Matrix,
    destination: &Matrix,
) -> Result<Matrix>
Expand description

Solve the 3x3 perspective transform mapping four [x, y] source points to four destination points, matching getPerspectiveTransform. Both inputs must be [4, 2] F32 matrices.

ยงErrors

Returns an error unless both inputs are [4, 2] F32 matrices yielding a nonsingular 8x8 system (no three collinear source points).