Project 5: Stitching Photo Mosaics

Wenlong Huang | cs194-26-agf


Part 1: Image Warping and Mosiacing

Image Rectification

To rectify an image, we first compute the homography matrix H using p' = H p for corresponding points p and p' in each of the images. Because H has 8 degrees of freedom, we need 4 corresponding points to exactly solve the equation, but this will be prone to noise. Therefore, we can set up a linear system of n equations (i.e. a matrix equation of the form Ah=b where h is a vector holding the 8 unknown entries of H) and solve it using least square. Then we use inverse warping to create the rectified images and crop it for better visual effect.