Computational Photography Project 1: Images of the Russian Empire


David Wang, Fall 2010

Single-Scale Implementation

I first wrote a function to align the small images using exhaustive search over the window -15 to 15 and using the sum of square differences formula to find the best alignment. Unfortunately, all but one image aligned correctly using this algorithm. However, when I tried aligning that image using the green channel as a base instead of the blue channel, I found that it worked.

Green: x=2, y=5
Red: x=1, y=10
Green: x=2, y=4
Red: x=2, y=9
Blue: x=-3, y=-7
Red: x=2, y=7
(aligned to green channel)
Green: x=1, y=-3
Red: x=1, y=4
Green: x=1, y=2
Red: x=2, y=9
Green: x=1, y=4
Red: x=1, y=13
Green: x=3, y=5
Red: x=4, y=11
Green: x=0, y=5
Red: x=0, y=11
Green: x=2, y=2
Red: x=2, y=4
Green: x=0, y=2
Red: x=0, y=9
Green: x=1, y=5
Red: x=3, y=13
Green: x=0, y=0
Red: x=1, y=5
Green: x=0, y=8
Red: x=0, y=13

Multi-Scale Implementation

Instead of using exhaustive search to align the large TIF files, which are each around 3000 pixels in width, I implemented a coarse-to-fine pyramid speedup recursively. The function makes its first estimate at 200-400 pixels, and simply searches around the previous estimate for every larger size. This speeds up the process of aligning the images considerably. There were no issues finding the correct alignment for all the large images. Below images have been scaled and compressed to JPEGs.

Green: x=6, y=43
Red: x=32, y=87
Green: x=-6, y=13
Red: x=-12, y=133
Green: x=10, y=-16
Red: x=17, y=11
Green: x=20, y=24
Red: x=33, y=71
Green: x=39, y=50
Red: x=60, y=106
Green: x=27, y=51
Red: x=36, y=108
Green: x=8, y=56
Red: x=11, y=116
Green: x=21, y=8
Red: x=43, y=73
Green: x=38, y=71
Red: x=62, y=148
Green: x=48, y=56
Red: x=87, y=143

Bells & Whistles