Homographies, or projective transformations, project points from a plane onto another plane and is defined by an invertible matrix transformation from
Note that
Applied to a line
so the projection of the line is
Computing Homography
We need four points to find the homography between two planes. Intuitively,
From Canonical Points
Weโll first cover a special case where the first plane is a unit square. We can then use two of its corners as well as the points at infinity:
Note that the first three points, when multiplied with
where
Our fourth point sums the columns of
Since
which is a system of three equations with three unknowns, thus giving a unique solution
Composing Homographies
If our first plane isnโt a square, we can find homographies
From General Points
We can generalize this solution to any number of points. Weโre given correspondences of the form
First, consider a single correspondence. We have
which gives us the following equations:
Solving for
Rearranging terms, we get
Putting this in matrix form, we have
We can do the same for
Then, we can apply the same idea to all correspondences and stack the rows together to form a general equation
where each
The vertical vector form of