CS180 Project1: Prokudin-Gorskii Collection
Introduction
The Prokudin-Gorskii collection contains three images for each subject, taken through red, green, and blue filters. However, these three color channels were not aligned when the image was taken. In this project I develop an algorithm to produce the final photographs by aligning the colors. The focus will be on using single-scale and multi-scale algorithms to align both small and large images.
Single Scale Alignment
Approach
For images with dimensions around 300 pixels, I iterate through pixel alignments from [-15, 15] and compute the L2 norm between the blue-red pair and blue-green pair. This aligns both the red and green filters to the blue filter. Although I experimented with Cross Correlation, the L2 norm yielded better results.
Results
Multi Scale Alignment
Approach
For larger images, iterating through alignments manually is computationally expensive. To speed up the process, I employ the image pyramid approach, reducing the image scale by a factor of 2 in each iteration. This algorithm is implemented recursively, stopping the scale reduction when the image reaches 200 pixels. If the stopping criterion is too small, it can lead to misalignments in some images, as small errors result in large displacements in the original image. I experimented with both L2 and Cross Correlation norms, ultimately choosing the L2 norm for its superior performance. Additionally, I considered using the Sobel operator to detect edges before comparing the images, which worked well for some cases but did not improve the overall algorithm performance.
Results
Displacement Table
Image | Red Displacement (x, y) | Green Displacement (x, y) |
---|---|---|
onion church | [27 50] | [ 36 108] |
melons | [14 86] | [ 12 174] |
three generations | [12 48] | [12,112] |
sculpture | [-10 34] | [-24 132] |
harvesters | [18 62] | [14,118] |
Acknowledgements
The structure of this page was inspired by a website, and parts of the code for creating the website structure were generated using ChatGPT