CS 180 Project 1

Vivian Liu

Website URL: https://vzliu.github.io/cs180/websites/proj1.html

Website template credit to CS 184

Overview

In this project I extracted three color channels from images and using image processing techniques, aligned the images such that the RGB channels would create a colored image.


Part 1: Single-Scale Images

For the single-scale low resolution images, I iterated over a [-15, 15] window of displacements, keeping track of the (x, y) displacements with the best score. I arbitrarily chose to use Euclidean distance, sqrt(sum(sum((image1-image2).^2))), as my scoring metric. I crop 10% of the image border on all sides. I found this made alignment better in some photos, possibly due to less confounding pixels.





All in all, while this approach worked for the lower resolution images depicted above, it was too inefficient for the higher resolution .tif images.


Part 2: Multiple Scale Image Pyramid

To speedup the processing of .tif images, I worked off the foundation I built in part 1. However, instead of working with the full-size image like in part 1, I rescaled the images first by a factor of 0.5. Then, I used the displacements from my recursive calls to adjust the shifted channel, before adding additional displacements and scaling up to account for the downsizing from earlier. In other words, I started with the smallest image and increased the image size as I went down the pyramid while adjusting the estimate (based off the previous estimate). This drastically reduced the image processing times to 1 minute or less. Again, I crop 10% of the image border on all sides. I found this made alignment better in some photos, possibly due to less confounding pixels.

Not all photos are displayed due to most of them looking similar to photos in the next section. Note: Some images don't display well before implementing Sobel edge detection (please see Bells and Whistles section)







Part 3: Bells and Whistles (Extra Credit)

All images except the Emir could be processed properly without further techniques beyond the image pyramid. However, for the Emir, I needed to use edge detection, which I accomplished with Sobel filter in the CV library.