CS 194-26 Project 4: Image Warping and Mosaicing

Adithyan Sujithkumar

Shoot and digitize pictures

The following images are the images I was using to try to warp and mosaic. I know some of these images aren't perfect, but I was trying to get my code working first before going back and perfecting the images. Since I never was able to get the code completely working, I just ended up sticking with these images.

Compute Homographies

I selected the points with ginput on python. I used this article as a guide to help me build my function to compute the homographies. I had difficulty finishing the project so I double checked my homogaphy implementation against cv2.findhomography() to double check my implementation was correct.

Warp Images

I had a lot of difficulties implementing my warp function. Below are the best results I could get. I couldn't figure out in the end how to remove the weird stretching artifacts. I think this is from the interpolation function I was using. I think if I could've found a way to 0 out that part of the image, the results would look a lot cleaner. Below are the left image, right image, and left image after warping.

I also tried to rectify my images as well, but the results did not turn out too well. The code for my attempt is in my notebook

Mosaic

Not done

What did I learn

I originally was using 6+ points for computing my homography and I was not getting my matrix correct. When I limited my points to just 4, my function immediately worked. I think in the future instead of assuming something won't work and trying to fix it ahead of time, I'll just try the simplest method first before trying something more clever or (what I think to be) more robust.