Sergei Mikhailovich Prokudin-Gorskii had recorded pictures onto glass plates using three different filters: a red one, a blue one, and a green one. This project attempts to align the three negatives from each color channel on top of one another such that they produce a colored RGB image.
Three color channels (R, G, and B) are first extracted from the glass plate image. With these three images, I searched over a window of 15x15 pixels to find the best displacements (in terms of achieving the smallest L2 norm) for optimal alignment.
Once the best displacements for each channel were found, I took each image and stacked them on top of each other to produce the colored version of the picture.
To minimize the affect of blurry and dirty edges on computing the best offsets, I cropped each image prior to the search by 1⁄10 of the original length and width.
To tackle larger images (TIFs) where the naive exhaustive search would be costly, I incorporated an image pyramid alongside the exhaustive search. I first rescaled the original image to be much smaller (.0625 of the original) then performed the exhaustive search on the rescaled image. The process was then repeated with .125 of the original, .25, and .5 while updating our displacement estimate.
For emir.TIF, my algorithm did not do so well in alignment. It was largely due to the difference in brightness of the filters (a lot of blue with little red). Thus, I decided to align the red and blue images to the green rather than red and green to blue. After switching to aligning the red and blue channels to green, emir aligned really well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|