Neha Patil (Editor)

Homography (computer vision)

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Homography (computer vision)

In the field of computer vision, any two images of the same planar surface in space are related by a homography (assuming a pinhole camera model). This has many practical applications, such as image rectification, image registration, or computation of camera motion—rotation and translation—between two images. Once camera rotation and translation have been extracted from an estimated homography matrix, this information may be used for navigation, or to insert models of 3D objects into an image or video, so that they are rendered with the correct perspective and appear to have been part of the original scene (see Augmented reality).

Contents

3D plane to plane equation

We have two cameras a and b, looking at points P i in a plane. Passing the projections of P i from a point b p i in b to a point a p i in a:

a p i = K a H b a K b 1 b p i

where the homography matrix H b a is

H b a = R t n T d .

R is the rotation matrix by which b is rotated in relation to a; t is the translation vector from a to b; n and d are the normal vector of the plane and the distance to the plane respectively. Ka and Kb are the cameras' intrinsic parameter matrices.

The figure shows camera b looking at the plane at distance d. Note: From above figure, assuming n T P i + d = 0 as plane model, n T P i is the projection of vector P i into n T , and equal to d . So t = t ( n T P i d ) . And we have H b a P i = R P i + t where H b a = R t n T d .

This formula is only valid if camera b has no rotation and no translation. In the general case where R a , R b and t a , t b are the respective rotations and translations of camera a and b, R = R a R b T and the homography matrix H b a becomes

H b a = R a R b T R a ( t b t a ) n T d R b T = R a ( I ( t b t a ) n T d ) R b T .

where d is the distance of the camera b to the plane.

The homography matrix can only be computed between images taken from the same camera shot at different angles. It doesn't matter what is present in the images. The matrix forms contains a warped form of the images.

Affine homography

When the image region in which the homography is computed is small or the image has been acquired with a large focal length, an affine homography is a more appropriate model of image displacements. An affine homography is a special type of a general homography whose last row is fixed to

h 31 = h 32 = 0 , h 33 = 1.

References

Homography (computer vision) Wikipedia


Similar Topics