High Dynamic Range Imaging

[Taking Photographs] [Down Sampling] [Image Alignment] [Response Curve & Recover Radiance]

[Tone Mapping by HDRShop] [Tone Mapping by Our Program] [Download] [Reference]


Taking Photographs

We use Nikon D80 to take our photographs. The machine is controlled by Nikon Camera Control Pro 2 [Nikon]. No other image enhancement is adopted. Raw images are restored and converted into BMP format by dcraw. Besides, we also restrict dcraw to any image enhancement or brightening algorithm to prevent images from producing redundant noise which is in the original images.

Three places are chosen: "Fu Bell", "Fu Garden", and a secret view of girl's dorm. For each place, we shot about 16 images at night in shutter speeds of the power of 2. For more details, you can check text file in each directory. One sample image is shown as below.


Down Sampling

Since the original size of the images is too large, we down sample all the images to max (height, width) = 800, and keeps the ratio between height and width unchanged.


Image Alignment

For image alignment, we implement the MTB algorithm in [Ward03]. Since the camera is almost still during our shot period, it is hard to see whether the algorithm is useful. Therefore, we randomly move the images by:

  	  ,  
and run the MTB algorithm on those images.

We first tested the algorithm on the picture set captured by Chia-Kai Liang [Liang], and put the results below. It is hard to perceive the movement in the small-size images, but if you increase the size of the images and play it one after another, you'll see the change obviously. After the image alignment, the positions of the pictures are the same.

  Before alignment:
  
  After alignment:
  
	

However, if we run the alignment algorithm on our pictures which are captured at night, bad results occur. The reason is that most pixels in the image are zero when the shutter speed is small. In this case, the median of the image is zero, and the number of pixels larger (smaller) than median threshold is changeable and also unreliable.


Response Curve Recovery and Recover Radiance Map

We implement the algorithm in [Debevec97], and process on each channel separately. The response curve is shown below.

One thing worth mentioning is that we change the weighting function to make the 0 or 255 pixels with a weight larger than 0 (0.1), or it would be weird at the two end-points in the curve.

After obtaining the response curve, the radiance map can be easily obtained by the formula in the lecture slide.


Tone Mapping by HDRShop


Tone Mapping by Our Program

Dodging and burning [Erik02]

Luminance

We adopt the equation mentioned in [Chen05] to obtain luminance.
L(x,y) = 0.2126R(x,y) + 0.7152G(x,y) + 0.0722B(x,y).

Global and local operations comparison (left is global, right is local)




Although local operation may produce some black regions near bright region, it still produces a much more satisfactory result in this case. Besides, black regions can be reduced by tuning parameters. However, this algorithm still fails in some area with too low luminance.
Bilateral Filtering

The algorithm is proposed in [Fredo02], they use an approximation to speed up the non-linear filtering job. We use brute force to run the bilateral filtering without any approximation.

I also implement the bilateral filtering using 3D-FFT [Paris06] without any approximation, that is, I didn't down sample the image as suggested in the paper. Experiment shows it is slower because the complexity is Nlog(N), where N is height width intensity_range. The complexity of bilateral filtering using brute force is only height width kernel_size. In other words, using 3D-FFT without approximation is even worse than filtering using brute force.


Download

Captured Images
Click the following url to download the zipped packages
[Fu bell][Fu garden][Secret place]
Source Code and Executive Files
To learn how to use, please check readme.txt
HDR (VS 2005 project) [download]
Executive (HDR.exe) [download]

Reference

  1. G. Ward, Fast Robust Image Registration for Compositing High Dynamic Range Photographs from Hand-held Exposures, jgt 2003.
  2. Chia-Kai Liang. (link)
  3. Paul E. Debevec, Jitendra Malik, Recovering High Dynamic Range Radiance Maps from Photographs, SIGGRAPH 1997.
  4. Fredo Durand, Julie Dorsey, Fast Bilateral Filtering for the Display of High Dynamic Range Images, SIGGRAPH 2002.
  5. S. Paris and F. Durand, A Fast Approximation of the Bilateral Filter Using a Signal Processing Approach, European Conference on Computer Vision, p. IV: 568-580, 2006.
  6. Nikon's website. (link)
  7. Hwann-Tzong Chen, etc. Tone Reproduction: A Perspective from Luminance-Driven Perceptual Grouping, CVPR 2005.
  8. Erik R., etc. Photographic Tone Reproduction for Digital Images, Siggraph 2002.