CS 194-26 Project 5 -- Part 1

Sean Dooher - cs194-26-acq

Overview

In this project, we first set out to use least squares to compute a homography matrix that allows us to warp one image into another.


(source: http://www.cse.psu.edu/~rtc12/CSE486/lecture16.pdf)

In order to warp an image into another image, I used an inverse warping technique. To do this, I first must calculate the set of all points in the destination image that map to the source image. As the warped image will still be a quadrilateral, we can create a bounding box by translating the corners of the source image using our homography matrix. Then we can use these corners to generate a superset of the necessary points.

With these points, we can translate them back to the source coordinate system using the inverse of the homography matrix we calculated going from the source image to the image we are warping to. With these newly translated points, we can delete any that went out of bounds of the original image. For the ones in bounds, we can simply grab the color at that position (or a lerp of surrounding pixels) and color the new warped image with the corresponding colors.

Results

Rectification

Here we can see how we can use this warping to rectify an image.

Stitch

Mochiko

Tile Floor

Blending

We can also blend together images using this same technique but overlapping the images.

Conclusion

In this first part of the project, I really enjoyed blending the images and creating panoramas. I learned about how to think about the images as a change of basis of coordinate systems and this helped me greatly.