CS194-26 Project 1

by Jordan Flores


Project Overview

To recreate Sergei Mikhailovich Prokudin-Gorskii's color photo technique, we take the negatives for the red, green, and blue photographs, align them, and stack them onto each other to create the final colored image.


Naive Algorithm

To find the alignment of the 3 color channels, the naive algorithm looks at range of displacements that would shift the channels to correctly line up. Most of the images align the red and green channels up against the blue channel. The algorithm would then exhaustively search the window of displacements and evaluate how well the channels matched up using the Sum of Square Differences, finding the alignment with the minimum difference. Images in the jpg format used this algorithm with a window of 15 pixels.

Examples


Cathedral.jpg

Monastery.jpg

Nativity.jpg

Settlers.jpg

Image Pyramid Algorithm


For the higher resolution images in the tif format, the naive algorithm would be too slow and inaccurate because larger number of pixels needed to be proccessed. To handle the high res, we can construct an image pyramid by scaling down the image and performing the naive algorithm at each level, finding the displacement faster. I constructed 4 layers for the tif images, scaling the lowest layer by 1/16th of the original image, looking at a decreasing search window the higher resolution the layer was. This algorithm was effective, speeding up the proccess and giving well aligned images.

Examples