Project 1¶
Introduction¶
(Introduction heavily adapted from the project description)
The goal of this assignment is to take the digitized Prokudin-Gorskii glass plate images and, using image processing techniques, automatically produce a color image with as few visual artifacts as possible. In order to do this, we will need to extract the three color channel images, place them on top of each other, and align them so that they form a single RGB color image.
Details¶
There were several things I considered for this process.
I implemented both sum of squared differences (SSD) and normalized cross-correlation (NCC) as alignment algorithms. I found greater success using NCC for the smaller dimension photos, so I used that going on. All the images used the blue channel as a reference to align the red and green channels to.
My original implementation searched over a 31x31 window to find the optimal alignment; however, for the larger photos, 31x31 was not enough. It would be too intensive to exhaustively search, so I implemented a pyramid seaarch to more effciently traverse the images. This involved searching 31x31 windows recursively while decreasing the image size at every level of the pyramid. I stopped the pyramid when the largest dimension was less than 100. Given the search window, the algorithm will not be searching over the entire image. However, if the optimal shift involved shifting over 30% of the image off the screen, the resulting colored image would not look aesthetic anyway.
Because the photos are scans of camera plates, most of the photos had black bars along the edges. These bars caused issues when finding the optimal alignment, so I automatically cropped the photos as part of the preprocessing procedure. In some scenarios, I also cropped into the image, but for the sake of demonstration I think I left enough of the photo.
The offsets I list do not take into account the cropping I did. It should not affect the offset values, but in case it does, I wanted to point that out.