CS 766 - Fall 2008

Project 1

Mayank Maheshwari / Blayne Field

Implementation details

Step 1: Images We took around 10 sets of images (both indoors and outdoors) with varying shutter speeds for the project. For conciseness of the report, there are only 2 sets on this page. We used the Canon Powershot SX100IS for the pictures. If you are interested in seeing our amateur photography and the tonemapped versions of our images, please email us.

Step 2: Assembling an HDR image The Matlab program radiance.m takes in the set of input images and outputs the response curve of the camera and the radiance map of the image. fcurve.m is our implementation of Debevec's algorithm implemented as gsolve in the paper.

Step 3: Tone Mapping We used the tonemap function in MATLAB for converting the radiance image into the tonemapped version. When using Matlab's tone map function, we had to adjust the saturation quite a bit in order to get a decent looking image. The "AdjustSaturation" parameter gave pretty good results with the value 4.

Step 4: Using the code A sample Matlab session for creating a tone-mapped image using our code is as follows:
files={'apartment_images/DSC_3724.JPG', 'apartment_images/DSC_3725.JPG', ...'apartment_images/DSC_3734.JPG'};
exp_times = [1/3200 1/1600 1/800 1/400 1/200 1/100 1/40 1/15 1/8 1/4 1/2];
hdr = create_hdr(files, exp_times, 2.5);

create_hdr.m relies on:
fcurve.m
every_x_pixels.m

Extensions

• Bilateral Filtering: Implemented the Bilateral Filtering Algorithm to get a filtered image of the radiance RGBE image to apply contrast reduction on. We implemented the algorithm described in Fredo Durand, Julie Dorsey, Fast Bilateral Filtering for the Display of High Dynamic Range Images, SIGGRAPH 2002. The MATLAB code bfil.m produces the filtered image. The filtered image is the "base" image while the detail layer is the division of input intensity by the base layer used in contrast reduction.

• Contrast Reduction using LCIS: Implemented the Contrast Reduction algorithm described in Jack Tumblin, Greg Turk, LCIS: A Boundary Hierarchy for Detail-Preserving Contrast Reduction, SIGGRAPH 1999. We used the contrast preserving contrast reduction method using LCIS hierarchy. It follows the analogy of fluid flow for pixel intensity being influenced by its 4 neighboring pixels. The parameters used were:
K=[0 0.0600 0.1000 0.1600]
w=[1.0000 0.8000 0.4000 0.1600 0.2000]
Timestep,T=1/32
The code is implemented in the files tmap.m and lcis.m .

• Comments The LCIS code runs pretty slow and almost took 15 minutes to produce the tonemapped image. It could be optimized to run faster.

Running the code :
Usage:
filtered_image=bfil(pixel_intensity_matrix,sigma_value)
imshow(filtered_image)

Scaling down the image would be a good idea considering the LCIS code is heavy and takes a lot of time to execute.

scaled_pixel_intensity_matrix=imresize(pixel_intensity_matrix,0.25)
scaled_filtered_image=imresize(filtered_image,0.25)
final_tonemapped_image=tmap(scaled_filtered_image,scaled_pixel_intensity_matrix,K,w,T)
imshow(final_tonemapped_image)
Source files:
bfil.m
tmap.m
lcis.m

Results

Set 1:
 Exposure time (secs) Image 1/3200 1/1600 1/800 1/400 1/200 1/100 1/40 1/15 1/8 1/4 1/2
Tone-mapped image:

Set 2:
 Exposure time (secs) Image 1/1000 1/640 1/320 1/160 1/100 1/50 1/25 1/15 1/8 1/5
Tone-mapped image:

Project Break-up Mayank Maheshwari-50%
Blayne Field-50%
We both took pictures, Blayne focused on recovering the f-curve and Mayank worked on bilateral filtering and tone mapping. We both worked on the radiance map.