Prokudin-Gorskii was a Russian photographer and scientist in the early 1900s who worked towards color photography. By creating red, blue, and green filters of the same image, he envisioned a time when these images could be stacked together to create a singular colored image.
I first implemented a single-scale search that iterated over a window of possible displacements, anywhere between [-20, 20]. This brute force algorithm used the Sum of Squared Differences (SSD) to calculate the best (lowest) score for a given displacement of a target image on a reference image. I specifically aligned the red and blue channels on the green channel. This was effective in aligning smaller .jpg images. I noticed that better alignment occurred when processing channels without their borders, so I cropped off the 10% of the top, bottom, left, and right of the images prior to the single-scale search.
cathedral.jpg | blue: (-2, -5) red: (1, 7)
monastery.jpg | blue: (-2, 3) red: (1, 6)
tobolsk.jpg | blue: (-3, -3) red: (0, 4)
The single-scale search is too slow on larger .tif files. To optimize runtime, I employed the image pyramid technique, in which both the target and reference images are recursively rescaled and processed to find the best displacement vector. I followed the steps below for my implementation:
church.tif with no alignment
church.tif aligned | blue: (-4, -25) red: (-8, 33)