Pictures taken
We compute homography H by obtaining 4 pairs of correspondence from two images through hand-picking the pixels in Adobe Photoshop, and solving a system of equations that correlate the 4 points. Both inverse and forward warping was implemented, the inverse warping fill in empty pixels using the nearest pixel while nothing was done using the forward warping. You will find the following images warped using the inverse warping.
By computing how much each corner of the image has traslated after warping, we know how much we should move one image such that the two images overlap accurately. Since not much distortion and color difference is observed, simply overlaying the pixels on top of the other work out fine for my set of photos.
We started off with the `harris.py` sample code provided, and I modify the minimum distance to be 50 pixels such that the we don't get exceessively large amout of corners detected.
We then implemenet the ANMS algorithm with robust coefficient = 0.9, such that neighboring pixels has sufficiently large feature strength. We choose the top 500 points out of the all the detected corners from each image.
Extract pairs of feature that match fairly well between two images from the feature points obtained from the ANMS algorithm. Threshold is chosen to be 0.4, such that the nearest neighbor matches way better than the second nearest neighbor, while some error is allowed before the rejection.
RANSAC is implemented: We randomly choose 4 pairs of matching features from the previous part, compute the Homography, transform all the features points with the Homography and compute a set of matching features whose Eucildean distance is within 10. We repeat the above for n=100 times and retain the largest set. We use the largest set of matching features to compute the Homography with Least Sqaures. We can see that a lot of features are rejected, compared to the picture above.
Left images: Auto-stitching, Right images: Manual-stitching