This project was using projective transforms to "rectify" images and create mosaics and panaromas. The steps were: shoot pictures, recover homographies, warp images, and blend images into mosaics.
Here are some pictures of linear interpolation with various C values
|
|
|
|
|
This is the matrix H such that for each point p1 in image1 to its corresponding point p2 in image2, you can get the relationship p2 = H*p1. This is a 3x3 matrix that does the perspective transform on each point of the original point. To construct this H, I used eight corresponding keypoints between each picture for mosaics and four corresponding keypoints for rectifying images, since you just need a rectangle.
Continuing on about what I stated above, "rectifying" images involved finding 4 keypoints of a warped rectangle (let's say a piece of paper that is lying down on a table and the camera is looking at it from the side), matching those keypoints to a rectangle (let's say now you're looking at the paper from bird's eye), and warping. Here are some cool images!
Here are some pictures of linear interpolation with various C values
|
|
|
|
This is essentially what the previous steps (finding homography, warping) led up to. Now, we can blend images into a mosaic. One way that you can do this (which is how I did it) is to have two images, warp one image into the other (say im1 is the warped one and im2 is the unwarped one), and use classic blending techniques to create a mosaic from im1 and im2. You can do this through laplacian, average blending, alpha blending, or simple naive blending. I implemented laplacian, but my naive blending, which involves just putting two together in the simplest way possible, looked much better
|
|
|
What I learned is just how iPhones create panaromas; as you turn it 360 degrees, the iPhone takes several instances of the photos with overlap and computes homography and just blends them together. This is pretty amazing.