P4: Stitch Photo Mosaics, Part 1

Rectifying:

Click to see the full-size image

Panoramas

Currently my function can only morph 3 images, on each left and right of the middle unwarped image. I started by doing a simply overlay:
This has noticeable artifacts at both locations where the images are overlayed. I switched to using alpha blending, where the overlap region is blended. This is the mask that combines the left image with the middle and right images.
Using this gives the following panorama:
The right seam is noticeably improved, but the left seam is still obvious. In addition, a triangle artifact appears in the upper left which didnt appear in the original. Here are my other 2 panoramas done using the same method:
As well as the third. All of these were taken with a Canon 40D and a 35mm f/1.4 lens on a tripod. Although this means that I am slightly moving the camera since the center of the image is in front of the rotation spot, from such far distances no real issues are noticeable.

Part 2-Autostiching

Autostiching involves automatically finding corresponding points between two images to generate the homography used above. The first step is to use the harris corner detector to detect corners in each image on which we can match. We reduce the number of points using adaptive non-maximal suppression to provide a smaller (500-1000) points which are evenly spaced across the image. We then can generate a small (8x8) patch for each corner which represents the image around that corner. A brute-force match is then used to find correspondences between point pairs. Finally, the RANSAC method is used to identify the largest match of points which agree with each other, which should be the correct points. In the below images, the blue points are the points after being supressed, the red points are potential matches (note many matches in the sky, all of which are incorrect). Finally, the green points are those which truly correspond properly between the two images.
Using these points, we can automatically generate the panorama as follows: (note this is a difference panorama than presented above since it uses an additional image on the left instead of an image on the right)