Due date: 18 May 2011
Here are two images represented with a Bayer pattern (View) and a modified Bayer pattern (View) that uses a white pixel instead of one of the green pixels. Write a command line program in Python to demosaic these images. Numerically compare the outputs of this program with the correct input image (View) (by differencing) and discuss.
The -p argument can be either "bayer" or "swhite" (for the second image).
Camera Geometry (20 points)
Write a command line Python program that takes as input a photo taken with a camera held perfectly horizontally, as well as the height of the camera over a flat ground and the focal length for a 35mm camera. The program should write a distance scale into the center of the image, indicating on the ground distance from the point of the ground where the photographer was standing.
This would write a distance scale for a picture taken at a height of 1.7m with a lens with a focal lenght of 50mm.