15-463 Fall 2015 Project 1

zherengz

The goal is to match the color channels. Due to the way colors work, I could not assume that the R channel was going to be high when the B or G channels were high. Therefore, instead of matching by intensity, I looked for areas where the color intensities changed. I did this with horizontal and vertical Sobel filters.

First, I needed to normalize the values from the Sobel filtering, so I squared them so that edge = high value. I divided the output by 4 to normalize it (found this value somewhere on the internet, not too sure how it works but it makes everything between 0 and 1). To further emphasize the edge, I transformed it to black/white using a threshold. The displacement is calculated by taking the least sum of square differences between the B and R or G channels.

Using a image pyramid which scales images 50% on each axis per level, I first used a 31x31 window on the coarsest image to find an approximate displacement. Then, I applied the algorithm on the next coarsest level of the pyramid using the previous displacement to narrow the search window.

Results on example images

File Picture Offsets (green and red) Notes
00029u.tif (13,41) (0,91) This one is noticeably off. I think it's due to the erratic color patterns in the grass combined with the horizontally repeating pattern with the logs in the river.
00087u.tif (37,49) (56,107) This one is slightly off due to the repeating patterns in the hut and the woman's outfit. You can see that the blue channel is shifted exactly the width of one of the circly bits on the outfit.
00106v.jpg (1,4) (-1,10)
00128u.tif (26,37) (38,53)
00458u.tif (0,41) (29,85)
00737u.tif (7,17) (14,50)
00757v.jpg (3,2) (5,5)
00822u.tif (25,57) (33,125)
00888v.jpg (1,6) (0,12)
00889v.jpg (2,2) (3,4)
00892u.tif (0,16) (3,41)
00907v.jpg (0,2) (-1,6)
00911v.jpg (-1,1) (-1,13)
01031v.jpg (1,1) (2,4)
01043u.tif (10,-16) (14,13)
01047u.tif (19,25) (33,71)
01657v.jpg (0,6) (0,12)
01880v.jpg (2,6) (4,14)

Results on other images from the Prokudin-Gorskii collection

Original Picture Offsets (green and red)
Link (0,51) (-11,123)
Link (-5,37) (-11,89)
Link (26,46) (31,109)