COLORIZING THE PROKUDIN-GORSKII PHOTO COLLECTION

TASK

Generate a colorized photo based on three monochromatic photo taken roughly at the same position. The goal is to adjust the position of the photo to align them together. If perfectly aligned, they can be colored as red, blue, green and be stacked togethor to generate a colored photo.

METHOD

  1. Alignment
    • Use SSD to calculate the accumulated difference between blue and green, blue and red
    • Find the minimum and adjust the photos correspondingly
    • Use NCC to calculate the correlation factors between each pixel
    • Find the parameters that is clostest to perfect correlation and adjust the photos correspondingly
  2. Pyramid
    • To increase the efficiency of search on large photos, use recursive methods to find the best adjustment
    • Reduce the image to less than 256*256 and find the best alignment parameter with the method above
    • Rescale the image to the next larger level and perform the alignment procedure
    • Add up the adjustment parameters in different layer

RESULTS

NCC G[0,0] R[8, -1] SSD G[-3,7] R[108, 17] SSD G[112,-3] R[110, 3]
SSD G[42,16] R[89, 22] NCC G[69,-4] R[119, -16] SSD G[82,4] R[177, 8]
SSD G[52,22] R[107, 35] SSD G[50,-2] R[133, -5] SSD G[51,5] R[105, 7]
SSD G[117,-7] R[107, 1] NCC G[145,-7] R[119, -15] SSD G[53,-5,5] R[67, -16]

OTHER PICS

>

REFLECTION

My algorithm did not align image the workshop very well. I think it might be because of the tone and color of the image is quite similar. I think I can improve by expanding the contrast of the pixels. Also, I would like to use edge detection to better align image with clear boundries.

BELLS & WHISTLE

AUTOCROPPING

I implemented the outcropping by looking for maximum color difference in a certain range on the top bottom and left right margin. I set the range from 1/20 onwards so that it can crop the discolored margin.

before after

AUTOWHITEBALANCING

Automatic white balancing by multiplying each pixel by 0.5/the average color of the image. To lighten the picture, one can set the value to 0.8.

before after setting average to 0.5, a grey day scenario