In this proejct, we are working with the digitized Prokudin-Gorskii glass plate images, which were initially taken in the early 1900. Our goal is to produce a color image by aligning the three RGB images.
WARNING: I've never done front end before in my life, so please excuse ugliness :')
Let's not go wild from the beginning, but follow directions : set one image as the base and do the exhaustive search on other images and score to get the best alignment using SSD. When we try it on a small image, we get the results below.
Note that to make the image looks nicer, I cropped the edges before and fafter the aligning process. I cropped 10% of images on each side to get rid of image boarders, and 15 pixels on each side after to get rid of color bleeding from the alignments.
Not bad! But did we just get lucky? Let's try a big picture!
Oof. Seems like we did get lucky. We observe 2 problems here: 1. The algorithm takes forever to run 2. The resulting image is not good! This must be the sign that we should take the hint from the direction and work with image pyramid.
Using image pyramid, we can start with the smallest scale and update our offset values as we go.
Note that I did the similar process I did with small images; I cut 10% of edges before the alignment, and cut extra 120 pixels on each side after the alignments. The result was quite effective!
So I wasn't so satisfied with how emir.tif turned out. So I wondered if chaning the base color to Green would make any difference. In fact, it seems like it did
This image looks a lot cleaner! I have 2 guesses around why this is happening:
1. Even with the image pyramid, we are searching over a certain range. Therefore, it is possible that the idea displacement is not within the range of search
2. Small scale image alignment moves the actually image quite a bit; for example, when I move the shift the image by 1 in 1/16 scale, I am moving the actual image by 16. Becasue of this nature of image pyramid, it is possible that we accidentally moved too far for some images.
Let's try aligning some more pictures from the collection!