CS 194-26: Image Manipulation and Computational Photography
Casey Takahashi
The goal of this project is to do a projective transformation in order to rectify images with known shapes, and also create mosaics/panoramas.
First, I took some pictures with my digital camera. For the rectification images, I took pictures of square objects from different angles. For the mosaics, I took 2 pictures from the same viewpoint, making sure there was plenty of overlap between the images (so there will be lots of correspondance points).
To recover the homographies, I used correspondance points (at least 4, although I found that the more points you have, the more accurate the estimation) to find the homography matrix.
Using the homography matrix found in the section above, I inverse warped the image by H.
To blend the images, I created masks and multiplied them by the images before adding the images together to create the final mosaic.
The original pictures are of square shaped pictures, so the final result should be a square. You can see the rectified images are warped to be more square like, however, they are a little malformed. I believe this is partially due to too few correspondance points, leading to too much error in the transformation.
Below are 3 examples of mosaics I produced. For the first mosaic, I used 8 correspondance points. For the second, 12 points, and for the 3rd, 21 points. You can see that as more points are included, the better the warped pictures fit together.
Apartment Wall:
19th Street Bart Station:
Room:
I really enjoyed learning how to create mosaics - it was interesting finding the homography, and seeing the warped pictures. :) This project was really fun, and I'm definitely excited to clean it up and play around with automatic panoramas in the next part of this project.