CS194-26

Zipeng Qin

Overview

The Prokudin-Gorskii collection contains images obtained from using plates that allow red(R), green(G), and blue(B) channels lights being captured respective from the same scene. The project's goal is to efficiently align the RGB channels to make colorful images

Approach

Smaller-sized jpg images: brute force search over the offsets range of -15 to 15 in both the x and the y directions. Calculating the offsets that give the smallest SSD(the Sum of Squared Differences) error, and using that offsets as the optimal offsets to align the images.

Larger-sized tiff images: Iteratively apply the brute force search over different scaled versions of the images. The images are first downsized to 1/16 of the original size. The images are then resized with a scale of 2 everytime and the offsets from the previous level are also scaled by 2. Then the brute force approach is applied with the range of x_offset-1 to x_offset+1 for the x direction and y_offset-1 to y_offset+1 for the y direction.

Problems

(1) Because the original R,G,B channels are captured not exactly at the same scene, with small shitfs between each channel, the borders of the three channels prevent the algorithm to perform well. So 10% of the images are cropped from each side. (2) For emir.tif, aligning against either the B channel or the R channel gives bad results. The G channel is chosen to be aligned against.

Results:

Workshop: For r-channel of image workshop.tif, the best x offset is -12, the best y offset is 105. For g-channel of image workshop.tif, the best x offset is 0, the best y offset is 53.

Emir: For r-channel of image emir.tif, the best x offset is 17, the best y offset is 57. For b-channel of image emir.tif, the best x offset is -24, the best y offset is -49.

Monastery: For r-channel of image monastery.jpg, the best x offset is 2, the best y offset is 3. For g-channel of image monastery.jpg, the best x offset is 2, the best y offset is -3.

Three generations: For r-channel of image three_generations.tif, the best x offset is 11, the best y offset is.\ 112. For g-channel of image three_generations.tif, the best x offset is 14, the best y offset is 53.

Melons: For r-channel of image melons.tif, the best x offset is 13, the best y offset is 178. For g-channel of image melons.tif, the best x offset is 10, the best y offset is 81.

Onion church: For r-channel of image onion_church.tif, the best x offset is 36, the best y offset is 108. For g-channel of image onion_church.tif, the best x offset is 26, the best y offset is 51.

Train: For r-channel of image train.tif, the best x offset is 32, the best y offset is 87. For g-channel of image train.tif, the best x offset is 5, the best y offset is 42.

Tobolsk: For r-channel of image tobolsk.jpg, the best x offset is 3, the best y offset is 6. For g-channel of image tobolsk.jpg, the best x offset is 3, the best y offset is 3.

Icon: For r-channel of image icon.tif, the best x offset is 23, the best y offset is 89. For g-channel of image icon.tif, the best x offset is 17, the best y offset is 41.

Cathedral: For r-channel of image cathedral.jpg, the best x offset is 3, the best y offset is 12. For g-channel of image cathedral.jpg, the best x offset is 2, the best y offset is 5.

Village: For r-channel of image village.tif, the best x offset is 22, the best y offset is 137. For g-channel of image village.tif, the best x offset is 12, the best y offset is 64.

Self portrait: For r-channel of image self_portrait.tif, the best x offset is 37, the best y offset is 176. For g-channel of image self_portrait.tif, the best x offset is 29, the best y offset is 78.

Harvesters: For r-channel of image harvesters.tif, the best x offset is 13, the best y offset is 124. For g-channel of image harvesters.tif, the best x offset is 16, the best y offset is 59.

Lady: For r-channel of image lady.tif, the best x offset is 11, the best y offset is 112. For g-channel of image lady.tif, the best x offset is 9, the best y offset is 51.

Additional Images

00605a: For r-channel of image 00605a.tif, the best x offset is 10, the best y offset is 111 For g-channel of image 00605a.tif, the best x offset is 13, the best y offset is 51

01074a: For r-channel of image 01074a.tif, the best x offset is 53, the best y offset is 143 For g-channel of image 01074a.tif, the best x offset is 36, the best y offset is 62

00646a: For r-channel of image 00646a.tif, the best x offset is 35, the best y offset is 144 For g-channel of image 00646a.tif, the best x offset is 22, the best y offset is 64

01158a: For r-channel of image 01158a.tif, the best x offset is 15, the best y offset is 105 For g-channel of image 01158a.tif, the best x offset is 17, the best y offset is 40