Alex Jiang

CS 194-26: Project 6 Part A

Image Warping and Mosaicing

Overview

        In this project, our overarching goal is to be able to stitch many different images together to create larger composite results, similar to a panoramic effect. Given the scope of the project itself, it is split into part A and part B; this portion, part A, focuses on our ability to warp individual images, and, in turn, warp one image to be merged with another. In other words, we are performing the preliminary steps to completing the larger project.

Part 1. - Rectifying

        The first thing we do when trying to mosaic two images is warp one to match the overall perspective we’re trying to achieve. One way to test that our algorithm is working correctly is to try and “rectify” an individual image to a preset perspective; for example, taking an off-angle shot and converting it into a front-on direction. To do so, we select some correspondence points (typically corners of an object, etc.) and align them to a shape of our choosing, like a rectangle. We can see the results of our algorithm on some of these examples below:

Original

Rectified

Original

Rectified

Original

Rectified

Part 2. - Mosaics

        Now, we utilize our verified warping algorithm to align two images. First, we take one and designate it as our “anchor” of sorts; this one will remain unwarped and will set the perspective that the other will align to. When taking the pictures, it’s essential that there is some subject present in both images (so we have something to align according to); when taking this, I stood in one position, rotated partially so that something stayed in the frame, and took another. Similarly to the previous part, we designate correspondence points, one set for each image, and then warp the second image to match the first. We then overlay them on top of each other, to get some results like those shown below:

Cal eSports Community Center

Image 1

Image 2

Mosaic

Foothill

Image 1

Image 2

Mosaic

My Apartment

Image 1

Image 2

Mosaic

Conclusion

        Although this part of the project could be considered somewhat of a warm-up in the grand scheme of things, it greatly reinforced my understanding of the core concepts and makes me a lot more confident moving forward with part B. My mosaics turned out pretty well, although the seams and overlap are discernable due to slight lighting differences in how the photos were taken. With a more precise photography setup, it would be a little cleaner, but overall I feel that I got what was intended out of this project. The algorithms I ended up having to implement weren’t overly complicated, but they definitely pushed me to exercise what I knew about image manipulation from the previous projects. Warping is a simple effect in concept, but the way it can shift perspective is surprisingly mesmerizing. The mosaicing seems arguably even more benign, but it actually looks really cool and my favorite part of doing this was definitely aligning the images and seeing how the correspondence points can affect my warping to create the final composite product.