15-862:Computational Photography

 

Assignment  1: Images of the Russian Empire ÐColorizing the Prokudin-Gorksii Collection

 

- Charudatta Phatak

(cphatak@andrew.cmu.edu)

 

Section 1:  Single Scale Alignment

 

For alignment of the 3 colorchannel images, two methods were used. One was the use of the L2 norm metricÐ SSD (Sum of Squared Differences). The second method was using thecross-correlation (cc) matrix and the Fourier transform. The cc matrix wascalculated in the fourier space by formula Ð

CC = F(x,y) * conjugate(G(x,y))

Where F(x,y) and G(x,y) arethe fourier transforms of the two images. The maxima of the cc matrix was thendetermined and the reqd. shift calculated.

The result of both themethods were similar as shown in figure 2. The fourier transform method was alittle faster than SSD. The results shown here are obtained using the SSDimplementation.

 

Figure 1Single Scale Alignment implementation of low resolution images

 

Figure 2Results of the FT based cross-correlation method.

 

 

Section 2: Multi ScaleAlignment

 

For alignment of the highresolution pics (3000 x 3500 pixels), a multiscale alignment routine was used.A image pyramid upto 4 levels was used, where every level had the dimensionscaled to half the size of the prev. one. The use of fourier method did notmake sense in multiscale, as FTÕs would have to be calculated for each sizeanyways. So SSD alignment procedure was used. The alignment was initiallyperformed on the coarse image (smallest size), the results then used foraligning the next level images. The full resolution images were taking a longtime, so results are of half resolution(1500 x 1500) only. Surprisingly thoughupto this resolution, the FFT based method still gave faster results.

Figure 3Results of multiscale implementation for image alignment

 

 

Section 3: Bells and Whistles

 

The colorized images producedusing the alignment programs still have some artifacts along the borders of theimages. This happens because the color channel information from all the threeimages does not match properly. Hence cropping of borders is one solution toget rid of these artifacts. The method I have used here to get rid of the edgeproblem, is using a Gaussian mask to smooth out the border regions of theimages. The Gaussian mask is calculated by convolving a rectangle of the sizeof the image with a 2D Gaussian function. The width parameter for the mask isset to (edge length)/8 pixels. The mask profile is shown in figure 4. Theresulting images are shown in figure 5.

Figure 4 Gaussian Mask used to smooth out the edges

 

Figure 5 Results of auto-cropping of image borders