Prokudin-Gorskii Project

Max Hawkins

I used a fairly simple algorithm to align these pictures:

  1. Split source image into three channels with the same size
  2. Generate a gaussian image pyramid where the smallest image has width > 400px
  3. Choose the channel that won't be shifted
  4. Crop all of the channels by 20% on all edges to eliminate errors from the image borders
  5. Search a -15:15 window in X and Y, minimizing the sum of squared distances
  6. Shift the channels by the optimal amount
  7. Combine the channels and save

To speed things up, I used Matlab's parfor loop so that each of the channels can be aligned on a separate core.

Curiously, I was not able to align image 00106v. Even when I set the window to the height of the image it failed to align. I did not have any problems with other images.

Red
[148, 62]
Green
[70, 38]
Blue
[0, 0]
Red
[147, 37]
Green
[70, 28]
Blue
[0, 0]
Red
[124, -11]
Green
[51, 0]
Blue
[0, 0]
Red
[50, 37]
Green
[35, 24]
Blue
[0, 0]
Red
[124, 34]
Green
[57, 24]
Blue
[0, 0]
Red
[0, 0]
Green
[-26, -1]
Blue
[-42, -4]
Red
[121, 10]
Green
[56, 11]
Blue
[0, 0]
Red
[113, 20]
Green
[51, 12]
Blue
[0, 0]
Red
[25, 9]
Green
[0, 0]
Blue
[17, -9]
Red
[68, 51]
Green
[23, 43]
Blue
[0, 0]
Red
[0, 0]
Green
[-52, -18]
Blue
[-93, -44]
Red
[112, 55]
Green
[48, 38]
Blue
[0, 0]
Red
[68, 28]
Green
[0, 0]
Blue
[-43, -33]
Red
[132, 18]
Green
[30, 10]
Blue
[0, 0]
Red
[5, 5]
Green
[2, 3]
Blue
[0, 0]
Red
[7, 0]
Green
[0, 0]
Blue
[-6, -1]
Red
[3, 1]
Green
[0, 0]
Blue
[-1, -2]
Red
[3, -1]
Green
[0, 0]
Blue
[-2, 0]
Red
[14, -1]
Green
[1, -1]
Blue
[0, 0]
Red
[4, 2]
Green
[2, 2]
Blue
[0, 0]
Red
[0, 0]
Green
[-5, 2]
Blue
[5, 5]
Red
[11, 8]
Green
[6, 6]
Blue
[0, 0]
Red
[14, 4]
Green
[6, 2]
Blue
[0, 0]
Red
[4, 5]
Green
[3, 3]
Blue
[0, 0]