Sergei Mikhailovich Prokudin-Gorskii (1863-1944) was a pioneering photographer who, in the early 20th century, utilized a unique color photography technique. He captured thousands of color photographs across the Russian Empire using a method that involved taking three separate exposures of each scene through red, green, and blue filters on glass plates. Despite his vision of projecting these images to educate Russian children, his plans were never realized, and he left Russia in 1918. Fortunately, his collection of RGB glass plate negatives survived and was later digitized by the Library of Congress (LoC), making them available online. The goal of this project is to process the digitized Prokudin-Gorskii glass plate images and reconstruct them into full-color photographs. This involves extracting and aligning the three color channel images (red, green, and blue) to produce a composite RGB image with minimal visual artifacts.
Used a Forbenius Norm, then normalized the respective matricies. Then returned the matrix dot product (elementwise).
Used np.roll to make the shifts across the columns and rolls, and found the best score using the normalized cross correlation
The Normalized Cross Correlation was not an effective metric especially since the brightness was not the same on some pictures, to combat this by shifting the mean brightness and standard deviation to match that of the blue channel.
Using an image pyramind helps us achieve the deseriable minute average per picture. We use the built in resizing and gaussian filter in skf, but as mentioned in the project specifics, we implement the pyramid scheme from scratch. At each level we apply a gaussian filter and resize the shape by half. By using the image pyramid, we leverage results of the smaller, downstreamed images to build back up. There is more code, but most of that is just bringing all the functions together to process the function and save the results.
Some images such as the Emir one were really struggling to align, so for my B&W I decided to use edge detection to align them. While the code is abstract, I did look at how it works at under the hood. A Canny Edge detection first starts off with a Gaussian Smoothing, which allows us to reduce noise in the image (outliers that might be interpreted as edges). Then we use gradients of pixels relative to the neighboring pixels to determine the edges as it tells us how sharp pixel color/brightness change, indicating an edge. The code is updated to perform the alignment relative to the edges with still usign image pyramid scheme.
I have also attatched all the images with their corresponding best green filter shift (with respect to blue) and red filter shift (with respect to blue).