Rectangularized Image

By choosing an arbitrary rectangle, I was able to warp my image such that the points in the original image fell on that rectangle!

Initial Images

I took a pair of images with my smartphone camera and manually chose correspondences between them. Since we're doing least squares, I thought it would be best to choose as many points as possible that I could accurately select.

Warped Left Image

I warped the image to the locations of the keypoints in the right image, after padding the image with 200 pixels to all sides. Using RectBivariateSpline, I was able to do an inverse warp, giving me better results than a forward warp!

Blended Image

Lastly, I performed a linear blend between the images with equal weight to both. I tried doing a spline by using a laplacian pyramid, but because of the black space and the strange orientation of the images, I wasn't able to find a proper mask so that it would turn out well.

Learnings

I feel so much more proficient with Python, as well as numpy. I've also gotten more confident with inverse warping and matrix algebra. I really didn't expect for the results to turn out as good as they did, and I'm really impressed at what we were able to do in this project.