CS 194-26 Project 1: Colorizing the Prokudin-Gorskii photo collection

Part 1: Exhaustive Search :)

In this part, I used an exhaustive search of a displacement of (-15,15) to align the 3 color channels. I used the Sum of Squared Differences (SSD) to score each displacement, and I took the lowest score to align the images. This method is ok to use for small photos with few pixels, but can be very costly when run on larger scale photos. The blue layer was used as the base for all of these small images. The displacements under each images are formated as [y,x].
Church
Green: [5, 2]   Red: [12, 3]
Church
Green: [-3, 2]   Red: [3, 2]
Church
Green: [3, 3]   Red: [7, 3]
Church
Green: [3, 0]   Red: [6, 2]
Church
Green: [4, 3]   Red: [11, 6]

Part 2 <3

In order to align larger images, I utilized a pyramid search where I found the displacement oh different resolutions of the same image starting from the lowest reolution and working back up to the original resolution, while scaling the displacements accordingly along the way. I had 4 layers that were scaled by 2 every time, so the coarsest image I had was scaled by 1/8. I also used SSD to determine if an alignment was a "good" one. After a few trials, I found that using green as base layer yielded the best results.
Church
Red: [33, -8]   Blue: [-25, -4]
Church
Red: [57, 17]   Blue: [-48, -24]
Church
Red: [64, -3]   Blue: [-59, -17]
Church
Red: [49, 5]   Blue: [-41, -17]
Church
Red: [60, 4]   Blue: [-52, -8]
Church
Red: [95, 3]   Blue: [-85, -10]
Church
Red: [57, 10]   Blue: [-51, -27]
Church
Red: [98, 8]   Blue: [-78, -29]
Church
Red: [59, -3]   Blue: [-51, -14]
Church
Red: [43, 26]   Blue: [-42, -6]
Church
Red: [52, -11]   Blue: [-53, 1]
Church
Red: [96, -5]   Blue: [-43, 7]
Church
Red: [97, 16]   Blue: [-75, -25]