Project 1: High Dynamic Range Imaging
Computer Vision – CS766 – Fall 2008
Christopher Hopman
Outline
Several algorithms were implemented for this project:
1. Recovering the high dynamic range (HDR) radiance maps from digital photographs
2. Using the HDR radiance maps to create high dynamic range images
Two references were key to this project. The technique outlined in Reference [1] was used 1 above, and Reference [2] was used for 2.
Images were captured with a Canon Powershot SX100 IS mounted on a small mini-tripod. Camera settings were controlled remotely via Canon's RemoteCapture DC software. Using this method there was no need to align images prior to processing.
Debevec's HDR technique was implemented in c++. The program will open first the file hdr.txt in the same directory. This file should contain a single line, the filename of the actual config file.
#config options
config1
config2
...
#image files
imagefile1
imagefile2
...
*
sample positions
#sample positions
sx_1 sy_1
sx_2 sy_2
...
^
response curves
#entries for red curve
rc_r_1
rc_r_2
...
#entries for green curve
rc_g_1
rc_g_2
...
#entries for blue curve
rc_b_1
rc_b_2
eof
Everything after the image filenames is optional, if provided it will be used
otherwise it will calculate new values.Using these sample positions the program applies Debevec's method. This hdr image is saved as hdr_image.hdr.
The program will then also take this image and apply Ashikhmin's tone-mapping algorithm and resulting image is saved as ashikh.jpg
The HDR results obtained were good, as is seen in the comparison of the tone-mapped images
with the non-processed images below. The images are taken from an unlit indoor area of
a bright outdoor opening. Both Reinhard and Ashikhmin tone-mapping algorithms produce better
results than a simple linear scaling, but Ashikhmin's algorithm produces more visually appealing
images.
This first image is made with 9 images with exposure time ranging from 1/8 to 1/1600
|
||||
linearly compressed to display range |
||||
tone mapped hdr image--Reinhard algorithm |
||||
tone mapped hdr image--Ashikhmin algorithm |
||||
This image was done with 14 images with exposure times ranging from 1/4 to 1/1600
|
||||
tone mapped hdr image--Reinhard algorithm |
||||
tone mapped hdr image--Ashikhmin algorithm |
||||
The recovered response curves are shown below. These were with lambda - the smoothness weighting - equal to 100.
P1 - HDR
(directory)
debevec.cpp
The meat of the code. Contains the code to select sample points and to apply the debevec algorithm.
ashikhmin.cpp
the code to apply the ashikhmin tone-mapping algorithm.
log.cpp / myfilters.cpp
just a little basic code moved out of the main file. logging and gaussian/other filters.
other stuff
other stuff in here is mostly just vc++ stuff or libs/dlls/include stuff
tunnel / lakelab
(directories)
Sets of source images and the resulting tonemapped images. tonemapped images are lakelab-reinhard.jpg, lakelab-ashikhmin.jpg, etc.
Release
(directory)
A compiled version, done w/ vs2008 on windows vista 64. Can you compile it with something else? I don't know, good luck. Also has hdr.txt, tunnel.txt, and lakelab.txt for image file information
include/ and libs/
(directories)
Contain the gil library, used for reading and writing images, including images in the .hdr format.
images
(directory)
just contains the image plot above and my favorite image
cjhopman-hdr.html
This file.
other stuff
vc++ stuff and other less important stuff.
[1] Debevec, Paul E. and Jitendra Malik. "Recovering High Dynamic Range Radiance Maps from Photographs", SIGGRAPH 1997
[2] Ashikhmin, Michael. "A Tone Mapping Algorithm for High Contrast Images", EGWR 2002.