# CS 194-26 Project 5A: Image Warping and Mosaicing

## Initial Photos

For my starting photos, I took a few sets of pictures around different areas of Berkeley to use for image mosaicing. Below are some of the initial sets.

## Compute Homography and Warp

After obtaining the images, I selected corresponding points on each of the images and computed the homography matrix to warp from one set of points to the other.

Here I have show some images for which I computed a homographies that mapped the original image to a planar image.

## Blend Images Into A Mosaic

After warping the images to the correct corresponding location, I blended the images together in a mosaic.

The coolest thing I learned from this part was how warping could be applied for image rectification. This is done by selecting 4 points in the image that would correspond to a square or rectangle when looked at straight on and computing the homography between those points and the expected square. I think it is amazing that this can be used to take previously unreadable or indetectable words or patterns in an image taken from the side and make them clearly seen in an planar image. It initially felt like this was a "free lunch" because it seemed like these pixels were coming from nowhere. However, I later realized that performing this warp definitely comes at the expense of image quality for more slanted pictures.

## Feature Matching and Autostitching

In this part, instead of manually selecting corresponding points between the images I need to stitch together, I implemented some algorithms to perform the feature selection and feature matching automatically

In the images below, the blue points correspond to harris corners, the orange points correspond to features matched with nearest neighbors, and the green points correspond to RANSAC results.

The last set of images that I used for part A, the two parts of the wall, had too little overlap for autostitching, so I took an additional set of photos of my stairs to do a vertical panorma

In this part, I thought it was really cool how accurate the feature matching through nearest neighbors and RANSAC could be. The difference between calculating the 1-nearest neighbor and the ratio between the 1- and 2-nearest neighbor was impressive. I found it very interesting to see how the features were narrowed down from harris corners, to nearest neighbor matched features, to the results of RANSAC.