CS194-26 Project 1 Swapnil Thombre

Overview

The goal of this project was to take 3 separate greyscale images that represented R, G, B negatives of the actual color image and combine them efficiently to colorize the picture. My approach to this project was to separate my code into two parts, the single scale with a method called "align" and the multi-scale with a method called "align_recursive". The single scale version used NCC, Normalized Cross Correlation, to find the appropriate offset of the G and R greyscale images to overlay onto the B image. The multi-scale one dealt with larger images so we had to use image pyramids, basically working our way up from a low resolution version of the image to the original resolution to save time in checking bad offsets. This was what align_recursive did for both the G and R greyscale images onto the B one.

My algorithm failed to align the emir.tif one because it was too bright and the NCC method I used couldnt find an accurate offset for that. I would have had to implement stronger edge detection for it to have worked testing something besides brightness.

All Images and Offsets

Lady

R-B Offset: (-30, 4)

G-B Offset: (-60, 5)

Harvesters

R-B Offset: (-26, 8)

G-B Offset: (-51, 7)

Icon

R-B Offset: (-37, 8)

G-B Offset: (-70, 11)

Self Portrait

R-B Offset: (-19, 14)

G-B Offset: (-29, 18)

Three Generations

R-B Offset: (-29, 6)

G-B Offset: (-57, 4)

Train

R-B Offset: (-36, 3)

G-B Offset: (-69, 16)

Turkmen

R-B Offset: (-29, 9)

G-B Offset: (-58, 13)

Village

R-B Offset: (-25, 6)

G-B Offset: (-47, 11)

Emir

R-B Offset: (-32, 12)

G-B Offset: (-27, -36)

Nativity

R-B Offset: (-9, 1)

G-B Offset: (-15, 1)

Cathedral

R-B Offset: (-7, 2)

G-B Offset: (-12, 3)

Settlers

R-B Offset: (-5, 0)

G-B Offset: (-10, -1)

Monastery

R-B Offset: (-4, 0)

G-B Offset: (-15, -1)

Select Images from LOC Library

Kuvshinki

R-B Offset: (-10, 3)

G-B Offset: (-15, 4)

Guardhouse

R-B Offset: (-11, 2)

G-B Offset: (-15, 2)

Pinkus

R-B Offset: (-7, -2)

G-B Offset: (-13, -6)

Gonki

R-B Offset: (-8, 0)

G-B Offset: (-15, 0)