CS194-26 Project 1
Requirements:
The folder should contain an index.html web page file that should include the following:
- Text giving a brief overview of the project, and text describing your approach. If you ran into problems on images, describe how you tried to solve them. The website does not need to be pretty; you just need to explain what you did.
- The result of your algorithm on all of our example images. List the offsets you calculated. Do not turn in the large .tiff images. Your web page should only display compressed images (e.g. jpg or png or gif if you want to animate something).
- The result of your algorithm on a few examples of your own choosing, downloaded from the Prokudin-Gorskii collection.
- If your algorithm failed to align any image, provide a brief explanation of why.
Describe any bells and whistles you implemented. * For maximum credit, show before and after images.
- Remember not to use any absolute links to images etc on your computer, as these will not work online. Only use relative links within your folder.
Overview and method
In this project, black and white images taken using three color filters are aligned to produce a mostly in focus color photograph. Photos are taken from the Prokudin-Gorskii Collection.
To align these photos, a normalized cross correlation is taken across the image to find the highest correlation shift. For larger images, this is broken down into a pyramid scheme where lower resolution versions of images are shifted first, and then within a range of the scaled up shift higher degrees of detail to the shift are realized.
Results on JPG Images
Since the JPG images are so small, a simple normalized cross correlation on each image in the center, with some cropping, is
JPG 1: cathedral
Shift Found:
- Red (12.0, 3.0)
- Green (5.0, 2.0)
JPG 2: monastery
Shift Found:
- Red (3.0, 2.0)
- Green (-3.0, 2.0)
JPG 3: tobolsk
Shift Found:
- Red = (6.0, 3.0)
- Green = (3.0, 3.0)
Results on TIFF Images
tif1: castle
Shift Found:
- Red = (98, 4)
- Green = (34, 3)
tif2: emir
Shift Found:
- Red = ( 767, 3150)
- Green = ( 49, 24)
Just by looking at these shifts we can tell that our algorithm strugled to align Emir. This is because we have large structures in the edges of the image that dragg the correlation to those highest shifts. That corruption makes our correction worse than the original image.
tif3: harvesters
Shift Found:
- Red = (124, 14 )
- Green = (60, 17)
tif4: icon
Shift Found:
- Red = (89, 23)
- Green = (41, 17)
tif5: melons
Shift Found:
- Red = (178, 13)
- Green = (81, 10)
tif6: onion_church
Shift Found:
- Red = (108, 36)
- Green = (51, 27)
tif7: self_portrait
Shift Found:
- Red = (176, 37)
- Green = (79, 29 )
tif8: three_generations
Shift Found:
- Red = (111, 11)
- Green = (52, 14)
tif9: train
Shift Found:
- Red = (87, 32)
- Green = (42, 6)
tif10: workshop
Shift Found:
- Red = (105, -12)
- Green = (53, 0)
tif11: lady
Shift Found:
- Red = (117, 12)
- Green = (55, 8)
Results on Personal Choice TIFF
I also chose this group photo in the collection to try with, as the human subjects are the most interesting and the most likely to move. If I had time, I would have adjusted the color balance, since red seems to be the strongest.
Shift Found:
- Red = (114, 15)
- Green = (33, 7)
Bells and Whistles
I have none to show. I really enjoyed this project, but had a very difficult week.