CS 194-26

Project 5: [Auto] Stitching Photo Mosaics

Zhimin Cai

Part 1: Image Warping and Mosaicing

Using Least Square to estimate the Homographic matrix H with manually labeled corresponding points on two images.

Ladder in Place?

1.1 Shoot the Pictures

1.2 Recover Homographies

1.3 Warp the Images

With the Homographic matrix, we can get pixels from original image using forward warping.

20 corresponding points

1.4 Retification

1.5 Mosaicing

warped left image with new shape & shifted right image with same shape

cropped final result

blended result image

We can find the overlapped part as a mask on final image, and use alpha blending to make the overlap part less obvious.

Part 2: Feature Matching for AutoStitching

2.3 Extracting a feature descriptor for each corner point

2.2 Adaptive Non-Maximal Supression

2.5 Ransac to get better Homography

2.4 Matching feature descriptor between images

2.1 Horris Corner features detecting

40 * 40 patch arround harris corner        8*8 gaussian blurre, subsampled, and normalized patch

only picking those corners who are a maximum in their neighborhood of r pixels based on their corner strength

With feature descriptors of each point, we remove all the outliers that are not closely matched or there are nearest neighbors that are too similar.


From the plot, we can tell most of features are on the overlapped part of the image. Although some features look too similar to each other, the algoritm can’t tell the difference. Most of the case, it does a good job of matching features.

2.6 Final results

largest inlier pairs


With Ransac algoritm, we select random 4 feature pairs to compute H. Then, we can count and keep inliers. We repeat this 100000 times and keep largest set of inliers to recompute least_squares H (estimate on all inliers). As a result, we get more accurate H,

Manual                                                                            Auto

3. Reflection

From this project, I get to know how feature matching is done and how ransac algorithm construct a robust Homographic matrix. It’s fun to play around with different pictures and get working results.