Back as early as 1907, Sergei Mikhailovich Prokudin-Gorskii had the vision of color photography. He travelled across the Russian Empire and took "color pictures" by recording three exposures of every scene onto a glass plate using a red, a green, and a blue filter in the hope that children would be able to learn about their colorful country.
This project taked digitalized version of Sergei Mikhailovich Prokudin-Gorskii's photos and produce color images.
For images that have low reolution in the collection, I implemented an algorithm to search over all possible diplacements within the user specifed searching window and produce the optimal displacements that yield the smallest distance between two channels.
A problem I ran into was that the alignment effectiveness can be heavily influnced by the noise at image border. To solve this problem, I crop both channels and only compute the distance between two channels within the crop.
Results are listed as follows: (when L2 distance and (-20, 20) serching window are used)
cathedral.jpg (5,2) (12,3)
tobolsk.jpg (3,3) (7,3)
monastery.jpg (-3,2) (3,2)
When dealing with large images, it would take too much time to exhaust all possible displacement possibilities. A strategy called "Pyramid Speedup" is used to improve the efficiency.
We can first rescale the large image to a smaller image (the first level of the image pyramid) and apply brute force alignment on the smaller image. The output would give us a rough position of the optimal displacements. Using it as an starting point, we can narrow down the searching space of an slightly larger image (the second level of the image pyramid). By doing this recursively, we are able to get displacements of large tif file in a timely manner.
The results are as follows:
lady.tif (55,8) (114,12)
train.tif (42,6) (86,32)
self_portrait.tif (78, 29) (175, 37)
icon.tif (41, 17) (89, 23)
workshop.tif (53,-1) (106,-12)
onion_church.tif (51,27) (108,37)
melons.tif (81,10) (178, 14)
castle.tif (34,3) (98,5)
three_generations.tif (52,14) (111, 12)
harvesters.tif (59, 17) (123, 14)
Pyramid alignment works well on most of big images. However it failed to produce a color image for emir.tif. This is because of the inconsistent brightness values among the three channels. Methods that have less dependency on brightness values are likely to have better result for emir.tif
emir.tif (48,24) (217, -213)
Using brute force alignment, more color images are generated.
(4,-4) (11, -9)
(3,0) (6,0)