Computer vision mini projects

Augmented reality with planar homographies.

A homography is the mapping between two views of the same plane. Estimate one reliably and you can paste anything you like onto that plane, which is the whole basis of marker-based AR.

Course 16-720 Computer Vision
Level Graduate
Descriptor BRIEF
Focus Projective geometry

Setting it up

After finding point correspondences between two images with a BRIEF descriptor, I estimated a homography between them and used it to warp and overlay content. To test it, I computed a homography between a textbook cover and the same textbook sitting on a table, then warped a Harry Potter cover and overlaid it onto the textbook.

Textbook cover reference image
Textbook cover.
Textbook on a desk
Textbook on the table.
Harry Potter cover to overlay
Cover to overlay.

The BRIEF descriptor supplied the corresponding matching points used to compute the homography. Tuning the matching parameters matters here: the homography is only as good as the correspondences feeding it, and a handful of bad matches will drag the estimate off.

BRIEF descriptor point matches
BRIEF descriptor matches.
BRIEF descriptor point matches after tuning
Matches after parameter tuning.

The cover was then warped and overlaid onto the textbook image to produce the result below.

Warped cover overlaid on the textbook
The warped cover overlaid onto the textbook.

From a single frame to video

With the homographies working well, I extended it to a full AR application, overlaying a video onto the book by computing a homography frame by frame.

Planar Homographies BRIEF Feature Matching Image Warping Augmented Reality