Assignment, ECE 516 Personal Imaging and Photoquantigraphic Image Processing

Long, multiple exposures.

Choose one of the following: Create running long exposures, over 10 images, 100 images, 1000 images, etc., as shell script running on a live webcam, such as or use the "canned" (dead, i.e. not live) images below, to understand imaging in lightspace.

Assigned 2006 March 11th

Due: 2006 March 17th

Consider the following two pictures that differ only in lighting.

(the above picture was taken 1998 Nov 7 15:36, at f/2.8 for 1/125sec)

(the above picture was taken Nov 7 17:53, f/2.8 for 1/4sec)

It is desired to combine these pictures together to arrive at a single picture that would render the scene as it would respond to both sources of illumination (daytime natural light plus night time building lights).

Question 1: adding lights
Begin by adding the two pictures together. Use a simple for next loop through all pixels, and scale each total back down (since pixels go from 0 to 255, the total will go from 0 to 510, so you need to scale back down by a factor of 255/510). Describe the picture that results.

Question 2: Lightspace processing
Add the quantities of light arriving at the sensor array due to each picture. Then render a picture that would have resulted from this total quantity of light. Assume that the camera reports f(q)=q^(1/4.7). Hint: compute the quantity of light falling on the image sensor due to the daytime natural light as q1=f1^4.7 where f1 is the first image, and the quantity of light falling on the image sensor due to the building lights at night as q2=f2^4.7 where f2 is the second image. After computing the total, q1+q2, and renormalizing, then compute the image f(q1+q2) that would have resulted from both light sources being on at the same time.

Question 3: varying the weights.
Experiment with different weightings, by rendering f((aq1+bq2)/(a+b)). For example, the image f((q1+8q2)/(1+8)) is illustrated below:

which has a very similar appearance to the following image that was actually taken Nov 9 at 17:12, e.g. while there was still a good amount of light left in the sky, but after the exteriour building lights came on:

Describe the difference you observe between adding the images and adding the lightspace, e.g. doing the addition operation in lightspace rather than imagespace.

The following program may be useful for these exercises: This program assumes the images are of type ppm, so you will want to convert the jpeg programs to ppm, using, for example, djpeg.

Bonus question: coloured lights.
Modify the above program so that it makes use of the six new define statements at the beginning instead of just WA and WB. In the modified program, the weights are R1, G1, B1 and R2, G2, B2, which are the red, green, and blue component weights for the two images. Now compute the result with these weights defined at the beginning of the program. Describe the resulting image.

You might also find the following program(s) useful: cement (Computer Enhanced Multiple Exposure Numerical Technique).