CS194-26 Project 1

 

Overview

 In this assignment we were tasked with aligning the red, green, and blue filtered images first captured by Sergei Mikhailovich Prokudin-Gorski into complete color photographs. To achieve this goal, both a naive and  image pyramid approach were used. In both cases, one color is used as an anchor of sorts and the other two are adjusted to it. To identify the the required displacment of these other color frames, L2 norm (SSD) was used to compare the images. For both, I cropped 10% from each edge to remove matching difficulties introduced by the edges of the images. Overall, I am quite happy with the alignments that were produced, even without any bells or whistles. There is, however, quite a lot of artifacts along the edges, and if I had more time, I would've liked to implement a cropping procedure.        

 

Naive Aproach

 For the naive approach, I simply used asingle 30 by 30 window of pixel displacments was tested. For loops were used to evaluate every displacment in the window, and the displacement with the smallest L2 norm value was selected for the final image.  Below is a comparison between the aligned and unaligned images.       

 

Pyramid Aproach

 For the image pyramid approach, the images were scaled down until both dimensions were less than 64 pixels. Using a 4 by 4 window, the offset was repeatedly aproximated and updated with increasingly larger images. The images were reduced by half size at every level of the pyramid until both the length and width were below 64 pixels. 64 pixels was selected as the smallest size after manually testing a few values and finding it to have the best looking alignment as was the -2 to 2 square window. My method seemed to produce closely aligned results, even the emir photo, which it was mentioned that it most likely wouldn't align well with standard methods, looks quite well aligned to me.