CS194 - Project 1

By: Albert Phone

Overview:

Small Photos

The purpose of the project was to take glass photo images which represented R, G, and B pictures and align so that we are able to colorize the photo. My approach was to search over a window of [-16, 16] and roll each R/G against the blue and keeping track of which roll value (x, y) produced the minimum SSD. This measurements best aligns the R/G/B images so when they are stacked, it produces a colorized photo.

G(5, 2) R(12, 3) cathedral

G(-3, 2) R(3, 2) monastery

G(3, 1) R(8, 0) nativity

G(7, 0) R(14, -1) settlers

Large Photos

My algorithm for the large photos was essentially to start at a factor of the each image at 0.0625. I then aligned the R/G against the B at this factor. After finding the proper (x, y) to align to, I then multiple the (x, y) to 1/factor to get the proper x and y at the factor 1 image. Then, I roll the images to that (x, y) and then rescale it down to factor*2 and decrease my window range by 2, so from [-16, 16] to [-8, 8]. As we scale up to our original image, we can decrease our search range in accordance with our scaling factor.

G(40, 2) R(82, -3) 00876u

G(52, -22) R(106, -55) 00882u

G(89, -19) R(185, -50) 01571u

G(59, 16) R(124, 13) harvesters

G(40, 16) R(90, 22) icon

G(56, 8) R(116, 11) lady

G(78, 28) R(176, 36) portrait

G(53, 14) R(112, 11) three

G(42, 6) R(87, 32) train

G(56, 20) R(116, 28) turkmen

G(64, 12) R(138, 22) village

Emir

For Emir, I did the same as I did for Large Photos, but instead I aligned the photos against G instead of B. This fixes the alignment issues I was facing before.

B(-50, -24) R(56, 17) emir