Prokudin-Gorskii Project
I used a fairly simple algorithm to align these pictures:
- Split source image into three channels with the same size
- Generate a gaussian image pyramid where the smallest image has width > 400px
- Choose the channel that won't be shifted
- Crop all of the channels by 20% on all edges to eliminate errors from the image borders
- Search a -15:15 window in X and Y, minimizing the sum of squared distances
- Shift the channels by the optimal amount
- 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.