Colorizing the Prokudin-Gorskii Photo Collection - CS 180
Francesco Crivelli
Methodology
This project involved reconstructing color images from Prokudin-Gorskii's digitized glass plate negatives by aligning the red, green, and blue channels. The alignment was achieved through a multi-step approach combining exhaustive search, image pyramids, border cropping, and edge detection.
Exhaustive Search: I began by implementing an exhaustive search within a 15x15 pixel window to align the green and red channels to the blue channel, using the L2 norm (SSD) to evaluate alignment accuracy.
Image Pyramid for Efficiency: To improve performance, I introduced an image pyramid technique, which recursively downsizes the images to align them at different scales. I made the pyramid levels adaptive such that the coarsest level's resolution was set to approximately 300 pixels. This allowed me to align images at lower resolutions, progressively refining the alignment at higher resolutions. The optimal shift found at each level was scaled and applied to the next finer level, thus significantly speeding up the alignment process without sacrificing accuracy.
Dynamic Border Cropping: Recognizing the impact of noisy borders on alignment, I implemented an automated border cropping strategy. The border size was dynamically set as 15% of the image size at each pyramid level to account for variations in resolution. This step helped to remove edge artifacts and focus the alignment on the central part of the images, where the content is most important.
Normalization and Window Refinement: For each pyramid level, the window size was refined dynamically, starting with a larger window at coarser resolutions and reducing it at finer resolutions. This allowed for more precise shifts at higher resolutions and ensured the process remained computationally efficient while maintaining alignment accuracy.
Images with Sobel and gaussian filtering applied. (each filter represents a channel
Provided Examples:
Emir.tif R:(104, 40) and G:(48, 24)
church.ti R: (58, -4), G: (24, 4)
train.tif R: (86, 32), G: (43, 3)
tobolsk.jpg R: (6, 3), G: (3, 3)
three_generations.tif R: (110, 8), G: (54, 12)
self_portrait.tif R: (176, 36), G: (77, 29)
sculpture.tif R: (136, -28), G: (35, -12)
onion_church.tif R: (104, 36), G: (54, 27)
melons.tif R: (176, 12), G: (79, 9)
monastery.jpg R: (3, 2), G: (-3, 2)
lady.tif R: (112, 8), G: (54, 7)
icon.tif R: (88, 22), G: (41, 17)
harvesters.tif R: (120, 12), G: (63, 17)
cathedral.jpg R: (12, 3), G: (5, 2)
White Balancing:
Implemented a white balancing function using the grey world assumption:
left hand side = image aligned ; right hand side = image aligned with white balancing
Other examples:
I am from Lugano, Switzerland. So it was amazing so having found my home town in the library