Skip to contents

Computes the 3x3 perspective (homography) matrix that maps src points to dst points. Requires exactly 4 point pairs.

Usage

perspective_from_points(src, dst)

Arguments

src

A 4x2 numeric matrix of source points. Column 1 = x, column 2 = y (1-based pixel coordinates).

dst

A 4x2 numeric matrix of destination points. Same convention as src.

Value

A 3x3 numeric matrix.