## Shivam Parikh Project 6A

Homographies and Rectification

For this part of the project, I used my DSLR camera and set the manual setting to take pictures in the same composition for each shot. Then I stood in one place and took a couple of pictures while turning. This was for my homography mosaic portion of the project.
I also took some pictures of various surfaces for the rectification purpose.
I selected feature points on each image as corners or similarities clearly visible to me.

The first Image

Selecting Points on the first image

One of the rectification images.

After selecting the points and creating the Homography code, I was able to warp the images to come up with something like this.

You can see a lot of the artifacts in this image, primarily because of using a forward warp instead of an inverse warp.

This is after using the inverse warp and I was able to interpolate points in the image.

To rectify the images, I defined a couplr of square shapes in a variety of sizes as well. Then, I called my warp algorithm on the source image with the square points.

A picture of my blanket.

Here is a small rectification

Here is a larger rectification

### Some other examples

To blend the images, I did a linear blend across the seam of the two images, and aligned the images by taking a feature point, applying the homography and calculating the transformation for that point. After that, it became a direct mapping because the warped left image and the planar right image were now in the same plane. Some examples are shown below.

And another example

And another example
Here you can see the alignment is almost perfect if you look at the floorboards near the bottom of the image. The blend leaves some discoloring but overall a good fit.

What I learned: I learned a lot about the linear algebra behind warping and homographies and how the panoramas on our phones are created in very easy manners. The work behind it was very hard though and I'm glad I learned how the program can be built in an efficient manner using vectorization and inverse warping to interpolate points.