Project Overview
This project aims to create color images from images on 3 different color channels (Red, Green, Blue) taken by Sergei Prokudin-Gorskii in the
early 1900s. We can do so by aligning these images such that the colors overlap to form a single RGB image.
Approach
I started out by implementing the 2 suggested metrics - Sum of Squared Differences (SSD) and Normalized Cross-Correlation (NCC) and running an
exhaustive search on the smaller .jpg
images first. I used [-15,15] as the range for possible displacements and used SSD for most images, using NCC for tobolsk.jpg
. I had problems with dealing with the borders so I automatically cropped 50 pixels from each side of the image before processing it.
For the larger .tif
images, I implemented a pyramid search algorithm. Using a scale of 0.25
, 5
levels and the [-15,15] range at the lowest level, I was able to significantly reduce the time to process these images to under a minute. I used SSD for almost all the tif
images and cropped
500 pixels from each to remove the borders.
Outputs
Castle.tif
Displacements
- G align with B = (-972, 1006)
- R align with B = (-908, 1006)
Cathedral.jpg
Displacements
- G align with B = (6, 29)
- R align with B = (12, 29)
emir.tif
Displacements
- G align with B = (-978, 1023)
- R align with B = (-980, 1011)
This image isn't perfectly aligned because of the brightness inconsistency between the 3 channels.
harvesters.tif
Displacements
- G align with B = (-961, 1019)
- R align with B = (-900, 1023)
Icon.tif
Displacements
- G align with B = (-980, 1023)
- R align with B = (-1188, 1279)
Lady.tif
Displacements
- G align with B = (-967, 1023)
- R align with B = (-907, 1023)
Melons.tif
Displacements
- G align with B = (-943, 1023)
- R align with B = (-846, 1023)
Monastery.jpg
Displacements
- G align with B = (0, 27)
- R align with B = (4, 29)
Onion_church.tif
Displacements
- G align with B = (-972, 1023)
- R align with B = (-915, 1023)
Self_portrait.tif
Displacements
- G align with B = (-946, 1023)
- R align with B = (-850, 1023)
Three_generations.tif
Displacements
- G align with B = (-972, 1023)
- R align with B = (-848, 959)
Tobolsk.jpg
Displacements
- G align with B = (4, 29)
- R align with B = (8, 29)
Train.tif
Displacements
- G align with B = (-980, 1022)
- R align with B = (-852, 943)
Workshop.tif
Displacements
- G align with B = (-970, 1023)
- R align with B = (-918, 959)
Example images
last_judgement.tif
- G align with B = (-972, 1022)
- R align with B = (-1357, 1471)
mother_of_god.tif
- G align with B = (-993, 1019)
- R align with B = (-960, 1023)
lilacs.jpg
- G align with B = (6, 29)
- R align with B = (11, 29)