The Prokudin-Gorskii photo collection is a series of color photos taken by Russian photographer Sergei Mikhailovich Prokudin-Gorskii. The images were special in that they were taken in a series of three images, each with a different color channel. However, the three images were not aligned, so this project aims to algorithmically align the images and colorize them. For very large images, the alignment process is done with an image pyramid for efficiency.
First, the image was split divied into the three smaller images containing the individual color channels. The images were then aligned by finding the best alignemnt in the x and y directions. The red and blue, and the red and green images were aligned separately. We iterate over a range of dx and dy values to find the best alignment. The best alignment was found by creating a similarity score calculated by the euclidean distance between the two images. The images were cropped before the comparison to remove borders which might interfere with results. The best alignment was calculated by finding the dx and dy values that minimized the similarity score. Finally, the images were aligned using the dx and dy values found, and layered on top of each other to create the final color image.
This Approach differs from the naive approch in that it uses an image pyramid. The naive approach would be very inefficient for large images since a very large delta would be required. In the image pyramid, the image is rescaled to a smaller size. Then, the downsized images are aligned using the naive way. The dx and dy values are then scaled up to the original image size and added to a total dx and dy value. Then, just like in the naive approach, the images are aligned using the dx and dy values found, and layered on top of each other to create the final color image.