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);
image(tonemap(hdr, 'AdjustSaturation', 2.6))
create_hdr.m relies on:
radiance.m
fcurve.m
every_x_pixels.m
Additional Implementation
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
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 |
Exposure time (secs) | Image |
1/1000 | |
1/640 | |
1/320 | |
1/160 | |
1/100 | |
1/50 | |
1/25 | |
1/15 | |
1/8 | |
1/5 |
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.