Prokudin-Gorskii, a visionary, was way ahead of his time; he explored an innovative idea of constructing color photographs by combining red, green and blue channels to create a colorized photograph as output. In this project, I have tried to reconstruct color pictures using some of the pictures he took.
Before combining the image, I had to align each channels properly. For smaller image, I was using a window of [-15,15] and compared a pair of channels. I used SSD as the metric to detect good matches. For larger images, I used a Gaussian Pyramid technique and started from a very coarse level. For each level, I kept on updating the window size.
Also, I had a graduate component in my assignment. The Hybrid project can be found atI implemented autocropping in the following way: I assumed that a good photographer will try to place interesting objects along the 1/3rd and 2/3rd for the vertical and horizontal line (rule of thirds in photography).
I sampled the 1/3rd and 2/3rd vertical and horizontal lines and computed how much the channels disagree. I used a simple metric where I computed the sum of the squares of difference in pair of channels. A small value is desirable; higher values mean that the pixels don't agree well. For larger pictures I started with a conservative boundary of 250 pixels of cropsize in each direction and gradually reducing the boundary. I stopped at the moment I found the difference is above a given threshold.
This method can be further stabilized by randomly sampling more horizontal and vertical lines and computing the vertical and horizontal cropsizes for each of them, and then taking an average.
After this, I sharpened the image using the technique taught in the class.
Although I implemented autocropping as a postprocessing step, in order to have a better alignment of each channels, I started with a cropped version of images of each of the channels. I did this because initially I was having problems with aligning the image. Since the pixel values close to the border of the image do not agree well, removing them helped me to find out a better alignment. Once I calculated the alignment, I used circshift() to align the channels. For autocropping, I used the uncropped, aligned version images from each channel.
I used the webpage of Natasha, our TA, to format my submission.