Mini project 2 · CMU 16-720
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.
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.
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.
The cover was then warped and overlaid onto the textbook image to produce the result below.
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.