CS 194-26: Image Warping and Mosaicing

Kin Seng Chau

Shoot and Digitize Images

Pictures taken

lab_left lab_right

street1_left street1_right

left right

Recover Homographies, Warping, and Rectification

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.

lab_right lab_warped

street1 street1_warped

Mosaics and Blending

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.

lab_left lab_right lab

street1_left street1_right street1

street2_left street2_right street2

Part 2: Auto Stitching

Harris Interest Point Detector

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.

lab_left_corners lab_right_corners

Adaptive Non-Maximal Suppression

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.

lab_left_anms lab_right_anms

Feature Descriptor extraction

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.

lab_matching

Feature Matching

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.

lab_ransac

Auto Stitching vs Manual Stitching

Left images: Auto-stitching, Right images: Manual-stitching

lab_auto lab

street1_auto street1

street2_auto street2