Lighting in Photography In this assignment, you will use multiple pictures under variable light position to create lighting and cartoon effects You will create (i) A shadow free image (ii) Special composition of colored lights (iii) A cartoon representation of the scene --------------------------------------------------------- (A) Available set Convert the movie 03LightStageRelight.avi into image sequence (e.g. using PaintShopPro) Otherwise use http://grail.cs.washington.edu/projects/photomontage/data/bronze.zip (B) Your own data set Take atleast 12-16 pictures Choose objects with vibrant bright saturated colors (toys, soda cans work best) Put the digital camera in remote capture time lapse interval mode (5 second interval) Lightwaving: Use a tablelamp to light the scene from a different direction in each image. Try to get light in 3 types of positions (i) Roughly cover the hemisphere around the object (ii) Along the axis connecting camera and object: Behind the camera, between camera and object and behind the object (iii) Light position very close to camera but to the left, right, top and bottom of the camera lens. Shadow Free Image Max composite of all images. But max will also carry the annoying specularities and bright highlights. (Max composite is built by taking the max intensity value at a pixel among all the values at that pixel in different images) Median composite. This will eliminate highlights but assumes that a pixel is in shadow in less than half the images (Median composite is built by taking the median intensity value at a pixel from all the values at that pixel in different images) Ordered (Maybe 2nd or 3rd ranked pixel intensity) For a given pixel, sort all the intensity values observed at that pixel in decreasing order. Then pick the 2nd or 3rd highest value. Visually ensure that the composite you have built is shadow free. Let us call this the shadow-free composite. Colored Lights The idea is to create synthetic relighting. See the following page which used just 2 lights http://www.sgi.com/misc/grafica/synth/index.html We want to take N lights and fuse the corresponding N images. Assign random (or pleasing) color to each light using a weight triple (wr,wg,wb) where each of wr, wg, wb is in [0,1] Scale the corresponding color channel of that image with this weight Take a weighted combination of N images to create atleast two different interesting final images You may want to assign weights based on the images came from type B(i), B(ii) or B(iii) as mentioned above Note, the weight triple for each image is different from weight used in final linear combination. Shadows analysis for creating cartoons We will use shadows as cues for shape boundaries and create a cartoon by highlighting the shape edges First we will find approximate location of the light source, follow light rays in image space and mark transition from lit region to shadowed region. This transition corresponds to shape edges. By highlighting shape edges, we will try to create cartoon images. See the page for some examples where only four images were used http://www.merl.com/people/raskar/NprCamera/ The procedure is as follows. Normalize each of the N images by taking pixel wise division of each image by the shadow free composite image You can do the normalization by simply taking the luminance channel of each image and shadow free image In each of the N normalized images, shadow will be emphasized but object color will be supressed Find the (approximate) direction of light in each image as follows. If the light source is seen in the image, mark it directly. But when the light source is not in the image, we can trace light rays to locate the source. Draw a ray connecting a shadow edge point with the corresponding object point. It is best to choose corners of sharp objects because the corresponding cast shadows have sharp corners. If your scene has mostly smooth, rounded objects, you can insert stand-up pencils, books or other sharp tipped objects. By taking interesection of 2 or more such rays, you can find the coordinate of the light source. The rays may intersect *outside* the image. The image point corresponding to the image of the light source is called the 'light epipole'. For our problem, we want only a very rough estimate of the light epipole. For B(i) and B(iii), it should allow us to classify whether the light is coming from left, right, top or bottom. Traverse in the scene from the light epipole and mark every negative transition in each of the normalized N images The traversal will be from left, from right, from top or from bottom. Take a union of all negative transitions you have marked. This should create an shape edge-map. Compare the shape edge map with intensity edge detection of the shadow-free image. Finally overlay this edge-map on top of the shadow-free composite. You may want to make the edges in edge map wider and the composite image brighter before the overlay superposition. For some of the last part, i.e. for normalization, ray traversal and marking of negative edges, you can use the code available at ftp://ftp.merl.com/pub/raskar/NPR/SourceCode/ Useful links http://www.merl.com/people/raskar/NprCamera/ http://www.sgi.com/misc/grafica/synth/index.html http://grail.cs.washington.edu/projects/photomontage/ ---------------------------What to submit--------------- Due Nov 17th All code For both datasets: Shadow Free composite (Max, Median, Ordered), Colored light output. Specify what weight triples and weights you used, Cartoon: Location of light epipole in atleast two images in which light source was not directly seen and the corresponding light rays you have drawn. Location of negative transition in each of the N normalized images Union of marked negative transitions (shape edge-map) Final cartoon image (shape edge map overlaid on shadow free composite) Intensity (Canny) edge detection of shadow free composite For dataset2: input images Send me URL to your assignment. Same page should have link to previous assignments. Your subject line should be '[Photo] FirstName LastName Assignment 3, SSN: last four digits' ---------------------------End Assignment Description---------------