High Depth of Field Images In this assignment, you will combine multiple pictures to create a high depth of field image Then you will create special effects (i) Change depth of field (ii) Change orientation of slab of focus Useful links http://grail.cs.washington.edu/projects/photomontage/ http://www.sgi.com/misc/grafica/depth/index.html http://www.cambridgeincolour.com/tutorials/depth-of-field.htm -------------------------------------------- 1. Here is the high level code for HDF creation Read in images 1 to n For each pixel Find local variance in n images Keep pixel with largest variance This should generate image where all pixels are in focus Create labeling for which pixel came from which image The lable values correspond to the image index Run a median filter to eliminate spurious lable values This labeling creates approximate (psuedo) depth map for the image where 1 indicates object parts closest to the camera and n indicates parts farthest from the camera 2. Special effects 2a. Changing depth of field Now you want to create an image where depth of field is larger than in the input images. However, for parts outside the depth of field the image should be blurred Use the psuedo-depth map created above and choose samples accordingly 2b. Changing orientation for plane of focus For each shaft (group of columns) left to right choose shaft from successive image 1 to n. This will create an image where plane of focus shifts from left to right Experiment to create other focus slab orientations. ---------------------------Assignment Description--------------- Dataset1 Download from bug.zip from http://grail.cs.washington.edu/projects/photomontage/ Dataset2 Take atleast 5 pictures of a scene with varying focus Keep objects at varying distance Search on web for 'depth of field' tutorials for samples Use remotecapture on Powershot Do not change aperture or exposure settings ------------------------------------------------- Create HDF image Average the n images in Matlab to get an idea of what you should get Write Matlab code to create your own HDF image Implement special effects Submit Due Oct 19th All code For dataset1: Average, label map, special effects results For dataset2: input images and three results Send me a link to your assignment ---------------------------End Assignment Description---------------