The goal of this project was to take the original glass plate images and use image processing techniques to best align the three channels in order to form a color image.
I used two main methods to colorize the images: exhaustive search and a pyramid search.
I performed a single scale exhaaustive search over a [-15, 15] window of displacements for each of the images. I used sum of squared differences (SSD) as my metric to get the best alignment, and found that it worked well for all the images. Instead of aligning to the blue channel like the starter code, I found that aligning to the green channel acutually led to better results. Lastly, since displacing the images causes weird borders on the edges, I cropped out 5% of the image on each side. It is interesting to note that I implemented exhaaustive search such that it is a special case of pyramid search where there is 1 level.
For the larger images, I used an image pyramid with 5 levels and a scale factor of 2 (from 1/16 scale to original scale). In order to reduce runtime, I reduced the serach window to [-5, 5] at each level and found that even with the reduced window I got great results. I applied the same cropping and aligned to the green channel, as I did for exhaustive search. Here are the results:
Original Images:
Aligned Images:
Original Images:
Aligned Images:
Original Images:
Aligned Images:
Original Images:
Aligned Images:
Original Images:
Aligned Images:
BlueRed
Cathedral (-5, -2) (7, 1)
Monastery: (3, -2) (6, 1)
Tobolsk: (-3, -3) (4, 1)
Church: (-25, -4) (33, -8)
Emir: (-49, -24) (57, 17)
Harvesters: (-59, -17) (65, -3)
Icon: (40, -17) (48, 5)
Lady: (-49, -8) (61, 3)
Melons: (-81, -10) (96, 3)
Onion Church: (-51, -26) (57, 10)
Self Portrait: (-78, -29) (98, 8)
Three Generations: (-50, -14) (59, -3)
Train: (-42, -6) (43, 26)
Workshop: (-53, 1) (52, -11)
Original Images:
Auto White Balanced Images:
Original Images:
Auto White Balanced Images:
Original Images:
Auto White Balanced Images: