Project 6: Image Stitching and Mosaicing

Melissa Su, cs194-26-aay

What I Learned Part 1

Matrix transformations are powerful and selecting points is quite tedious.

Part 1 Process

First I manually select corresponding points in each image. We compute the 3x3 homography matrix using these points. We solve for 8 variables in the H matrix using a least squares approximation. Next we warp each image to the plane of the base image. I used linear blending to stitch the images together.

Results

AT&T Park: original and warped photos

AT&T Park Mosaic

Room: original and warped photos

Room Mosaic

Living Room: original and warped photos

Living Room Mosaic

Cabinet: original and warped photos

Cabinet Mosaic

What I Learned Part 2

Reading technical papers is not my thing, and between being sick, bad air quality, and family reunions I will be ok with a non fully functional part 2. I'm still not sure what is wrong with my RANSAC but the outliers are preventing me from creating reliable H matrices.

Part 2 Process

ANMS

ANMS gives us the 500 best points out of the points chosen from the given get_harris_points function. For each corner, we find a minimum radius to another corner with at least 90% f its corner strength.

Comparing images before and after ANMS

Feature Descriptors

We now use our interest points as feature descriptors by extracting a 40x40 patch for each point and resizing the patch to 8x8. We also normalize the patches.

Feature Matching

We now find consistent features between two images. We calculate the squared distance from every feature in the first image to every feature in the second image. If the ratio of the distance to the 1st nearest neighbor over the distance to he 2nd nearest neibor is less than some threshold, then the pair is a match. I used a threshold value of 0.5.

RANSAC

To remove outliers we run RANSAC. We choose 4 potential matches randomly and compute H with these points. We warp all match points from the first image according to H and compute the SSD between them and the points in the second image. I ran this 500 times with an error threshold of within 100 SSD units.