In this project, the goal was to align digitized versions of Prokudin-Gorskii glass plate images by splitting and aligning the three color channels (red, green, and blue) to create a composite color image. Multiple alignment techniques, including SSD (Sum of Squared Differences) and NCC (Normalized Cross Correlation), were explored for both TIF and JPG images. For JPG images, an extensive search method was used to find the optimal alignment. For TIF images, a pyramid approach was implemented to handle the larger size and complexity more efficiently. To further enhance the alignment results for `emir.tif`, image filtering techniques like Sobel were applied to minimize visual artifacts and improve accuracy.
Approach: To enhance the accuracy of image processing, I converted the
images to a [0, 1] range using sk.img_as_float
. I
experimented with both SSD (Sum of Squared Differences) and NCC
(Normalized Cross Correlation) for image alignment, and both yielded
similar results. An extensive search method was used to find the best
alignment due to the relatively smaller size of the JPG images.
While using SSD for alignment, I used Euclidean Distance squared as the metric. I needed to negate the result, as larger values indicate worse alignment (i.e., larger differences between images), whereas smaller values suggest better alignment.
For NCC, I computed the similarity between images by normalizing them and calculating the dot product of the flattened, normalized images. This approach measures how well the images align by comparing their normalized pixel values, with higher values indicating better alignment.
Approach: For TIF images, I implemented a multi-scale pyramid approach to efficiently align the images despite their larger size and complexity. The pyramid approach allows for progressively finer alignment by analyzing images at different scales. However, the initial results for `emir.tif` were not satisfactory. To address this, I incorporated Sobel edge detection to improve alignment accuracy.
Although most of the images aligned really well, emir.tif was not aligned perfectly. To address this, I implemented the Sobel filter. The Sobel filter is an edge detection algorithm that highlights edges in an image by calculating the gradient of pixel intensities. This helps in refining the alignment by focusing on the prominent edges, leading to a more accurate composite image.
A few examples of my own choosing from (https://www.loc.gov/collections/prokudin-gorskii/?st=grid)