15862 – Computational Photography

 

Assignment  1: Images of the Russian Empire: Colorizing the ProkudinGorskii Collection

- Nisarg Vyas (nisarg AT cmu DOT edu)

 

 

Section 1: Alignment in Single Scale Implementation

 

 Two different metrics to score aligned images were used: First one was Sum of the Squared Differences (SSD), and the other one was Normalized Correlation  Criterion. Both had very similar results on the images I tried. The results presented here are produced using Normalized Correlation Criterion. Although the SSD measure was used unnormalized, there wasn’t any misalignment observed on the test images. 

 

 

        Fig 1: Single scale implementation results for colorizing the Prokudin-Gorskii collection

 

Section 2: Multi-scale Implementation

 

Here are some results on some large .tif images (approx. 3000x3500 pixels). The pixel displacement in these images was very significant and hence it was not possible to carry out single level exhaustive search. To deal with it, each image was scaled down to a coarse level and displacements at that scale were computed, then the images were aligned according to the displacements. The processing is done sequentially on further higher scales of images (by making use of the coarser scaled images). All images shown here are at 1/2 of their original scale. (approx 1500x1700 pixels). I have implemented a 4-level pyramid.

 

MATLAB Handle GraphicsMATLAB Handle Graphics                          

MATLAB Handle Graphics

                                 Fig 1: Multi scale implementation results for colorizing the Prokudin-Gorskii collection

 

 

Bells and Whistles

 

1) Automatic Border Cropping

 

The Glass plate negatives have strange artifacts at the border. Hence, any means of cropping that part was desirable.

 

I came up with some heuristics to solve this:

Firstly, the artifacts occur where the information among the channels do not match properly. And mostly they are near the border.

So, I derive undesired border points as:

 

       If  (x < .1 * height or x > .9 height) and ( y < .1 * width or y > .9 width) and ( (image(x,y)i - μi )  > σi)  then, B(x,y) = 1

       Else B(x,y) = 0

       Where x & y are the co-ordinate values, height and width are the corresponding heights and widths of images. μi &  σi  are means and standard deviations of the each channels, i=1,2,3.

 

Results

                       

                             Input Images                                                                     Cropped Images                                                            

 

 

 

                            Fig 3: Input images and results for automatic border cropping

 

2) Trying ProkudinGorskii technique at home

 

     For this task, I captured some pictures which have white content in it. Then I used red, green and blue colored cellophane papers as the color filters. The aligned composite image does not look very good (Fig. 4(e)), this is because the filters I have used do not match with true R,G,B filters. I applied reference white-balancing technique to enhance the image, and also applied contrast stretching. The result image is shown in Fig 4(f).

         The reflectances on the spectral surfaces on the coffee-maker and on the bottle are assumed to be as reference-white. The intensity in other image pixels is changed according to the reference-white value.

 

    

                      (a)                                                                     (b)   

                                                

                        (c)                                                   (d)

         

                                                (e)

                                                                          

                                                                     

                                                                     (f)

 

Fig 4: (a) Original image (b) Gray image with Red filter (c) Gray image with Green filter (d) Gray image with Blue filter (e) Composite aligned image (f) result after white-balancing and contrast stretching