CS194 Project 1

The goal of this project is to take digitized glass plate images and create a colored image. My approach included 2 parts: image pyramids and calculating the SSD scores to yield the best offsets.

To compute the image pyramids, I first take the log base 2 of the image size and divide it by 2. This represents the number of levels I will reduce the size of the image to with each reduction halving the image size. For example, an image of dimensions (2568, 3009) will first be reduced to dimensions (160, 188). From there, at each iteration, the image size will be doubled until the image size returns to the original image size.

The second part of the project is to calculate the SSD scores that yield the best offsets. To do this, I need to find a good window size to check for for each image pyramid level. I wanted the largest image sizes in the pyramid to have the smallest offset, so the original sizes would have window sizes of [-2, +2]. From here, at each level of decreasing the image size, I doubled the image window size. To prevent the image size from becoming too large, I set the max image size to 15 or the image size/20. For calculating the SSD scores, I would calculate them at each offset and record the min SSD score and use the results as pointers for the next level in the pyramid.

Results

Cathedral

out_cathedral

Offsets for Green: (2, 5), Offsets for Red: (3, 12)

Emir

out_emir

Offsets for Green: (24, 49), Offsets for Red: (55, 103)

Harvesters

out_harvesters

Offsets for Green: (16, 59), Offsets for Red: (13, 123)

Icon

out_icon

Offsets for Green: (17, 41), Offsets for Red: (23, 89)

Lady

out_lady

Offsets for Green: (9, 51), Offsets for Red: (11, 112)

Monastery

out_monestery

Offsets for Green: (2, -3), Offsets for Red: (2, 3)

Nativity

out_nativity

Offsets for Green: (1, 3), Offsets for Red: (0, 7)

Self Portrait

out_self_portrait

Offsets for Green: (29, 78), Offsets for Red: (37, 176)

Settlers

out_settlers

Offsets for Green: (0, 7), Offsets for Red: (-1, 14)

Three Generations

out_three_generations

Offsets for Green: (14, 53), Offsets for Red: (11, 112)

Train

out_train

Offsets for Green: (5, 42), Offsets for Red: (32, 87)

Turkmen

out_turkmen

Offsets for Green: (21, 56), Offsets for Red: (28, 116)

Village

out_village

Offsets for Green: (12, 64), Offsets for Red: (22, 137)

Self-selected Images

Building

out_building

Offsets for Green: (6, 28), Offsets for Red: (12, 104)

Boat

out_boat

Offsets for Green: (38, 42), Offsets for Red: (79, 134)

Railroad Tracks

out_railroad_tracks

Offsets for Green: (-5, 35), Offsets for Red: (-11, 120)

Notes

I did have some trouble on emir.tif, but I found that shifting the colors around green instead of blue made the image clearer. I did not do any bells and whistles.