In this project, I took black/white images from the Prokudin-Gorskii photo collection and constructed their color versions. This was possible because each b/w image was taken with three separate color filters, one for each of red, green, and blue. This effectively made three channels that I could combine to reconstruct the color image.
The main challenge with the reconstruction was to figure out how each channel should be aligned in order to produce a clear image. With the smaller pictures, it was easy to just brute force a 15 by 15 area of offsets. For each offset for a pair of channels I was trying to align, I'd calculate the L2 norm of their differences. I would take the offset with the smallest L2 norm, assuming that that was the most aligned. I did this for green vs blue and then red vs blue.
|
|
|
The above approach is too inefficient. For much larger images, I opted to use a recursive approach to find the optimal alignment. First, I would scale down the channels to 10% their original size, then run the naïve approach on them. This would give me a general idea of where the optimal alignment is. I'd then scale the channels to 25% their original size and run the naïve algorithm, but starting from the alignment given to me by the previous iteration. Then 50%, 75%, 100% in order to slowly hone in on the correct alignment. As long as the correct alignment was within 200 pixels or so, this method worked. I shaved off time by cropping out more of the boundary.
|
|
|
|
|
|
|
|
|
|
The special case with Emir resulted from the the massive disparity between the three color channels. The offset between the channels is too large for my algorithm to handle.
|
|
|