Assignment 1

Grace Su (Andrew ID: gdsu)

1. Single-Scale Version

I first cropped the image by a fixed value on all sides to remove the border around the actual image. Then, to align 2 channels, for displacements in the range (-15, 15) in both the x and y directions, I calculated the sum of squared differences (SSD), and used the displacment with the smallest SSD for the final alignment.

My implementation calculated that the green channel had a (y,x) offset of (-8, 2) from the blue channel, and the red channel had an offset of (-14, 3) from the blue channel.

The output image is shown below:

cathedral
Cathedral: G(-8, 2), R(-14, 3)

2. Multi-Scale Version

I first cropped the image by a fixed value on all sides to remove the border around the actual image. Then, for my multi-scale alignment procedure, I used 5 image scales, where each successive scale was smaller by a factor of 2. I used my single-scale alignment function to calculate the best displacement at each scale. I then scaled the displacement by a factor of 2, then used that result as the initial displacement for the next scale.

2.1 Results on given example images

Village: G(-35, 12), R(-63, 23)
Turkmen: G(-43, 19), R(-86, 26)
Train: G(-57, 1), R(-112, 30)
Three generations: G(-45, 12), R(-89, 9)
Self portrait: G(-23, 27), R(-26, 35)
Lady: G(-46, 0), R(-95, 0)
Icon: G([-60, 17), R(-110, 22)
Harvesters: G(-40, 15), R(-77, 13)
Emir: G(-51, 24), R(-96, 42)

2.2 Results on other images from the collection

01079a: G(-23, 24), R(-27, 37)
00902a: G(-80, 23), R(-169, 29)
00904a: G(-79, 21), R(-143, 30)

3. Bells and Whistles

I also added the following bells and whistles:

Here is a comparison of before and after adding the bells and whistles:

01079a before adding bells and whistles
01079a after adding bells and whistles