Project 1 - Images of the Russian Empire

In this project, our goal is to take three grayscale images of the same picture and produce a colored image using image processing techniques.

Approach

Part 1: Naive Approach

The naive approach to the problem is to do exhaustive search and search over a [-15, 15] window of displacements for an image and compute the normalized cross correlation between the shifted channel and the channel to be aligned with, always blue in this case. We then select the displacement that gives the best correlation and align the shifted channel with the blue channel. However, this approach does not scale well to larger images and would be too computationally expensive.

Part 2: Image Pyramid

To make the search more efficient, I implement a coarse-to-fine approach in which we continually downsample by .5 until we reach a small enough image size (250 x 250 for me) and then run our naive search on that downsampled image. Then, we search in a 6x6 square at each iteration above the base in our pyramid to reduce our search space. Results were mixed as some images seemed to fit well but others not as much. For .tif images, I ended up doing a crop of 200 pixels in each side and this resulted in much better results. While most images worked well, the Emir image had difficulties because of the saturation of the blue. Specifically for the Emir image, I ended up aligning the channels with the green channel this time, so the blue intensities would not mess things up.

Results

Example Images

Red Shift: (-7, -1) Green Shift: (-6, -1))

Red Shift: (-13, 2) Green Shift: (-11, 1)

Red Shift: (-9, 1) Green Shift: (-5, 1)

Red Shift: (-2, -1) Green Shift: (-1, 0)

Blue Shift: (-77, 17) Red Shift: (84, -24)

Red Shift: (-141, 13) Green Shift: (-73, 16)

Red Shift: (-178, 23) Green Shift: (-93, 17)

Red Shift: (-158, 11) Green Shift: (-75, 8)

Red Shift: (-90, 36) Green Shift: (-57, 26)

Red Shift: (-153, 10) Green Shift: (-79, 14)

Red Shift: (-178, 32) Green Shift: (-90, 5)

Red Shift: (-152, 26) Green Shift: (-78, 18)

Red Shift: (-128, 22) Green Shift: (-68, 12)

Selected Source Images

Red Shift: (-151, -37) Green Shift: (-108, -18)

Red Shift: (-143, 4) Green Shift: (-75, 6)

Red Shift: (-219, 42) Green Shift: (-124, 24)

Red Shift: (-209, 42) Green Shift: (-111, 23)