CS129 Project 5: High Dynamic Range

Reese Kuppig (rkuppig)

Modern photography fails to capture the full dynamic range of live scenes, limited by the narrow range of scene intensities that can be captured in a single image. By varying the exposure length of a single capture, different ranges may be captured, but compared to the scene intensities that we naturally perceive, certain areas of the image will appear over or under-exposed. HDR photography expands the range of a captured scene by combining multiple exposures of that scene, each capturing a different slice of the full dynamic range. This algorithm generates HDR images from a set of variably-exposed scene images by reconstructing the radiance of each point in the scene and then performing tone-mapping to translate radiance to pixel values.


Algorithm

The algorithm consists of two distinct operations: Scene Radiance Reconstruction and Tone-Mapping.

First, the scene radiance is reconstructed from a set of variably-exposed images by calculating the approximate nonlinear function mapping exposure duration to pixel value. From this function, the radiance at each point in the scene is calculated.

Second, the recovered radiance values are mapped to the range of pixel values. This tone-mapping can be performed on a global or local scale. In global tone-mapping, a general function, such as log, is applied to every radiance value, and then the resulting values are linearly scaled to the image range. In local tone-mapping each radiance value is examined in the context of its surrounding values, and the radiance image is decomposed into a smoothed base layer and a detail layer. By separately enhancing the base and detail layers before recombining them, the overall range and saturation of the image is improved.

Scene Radiance Reconstruction

Durand Local Tone-Mapping

Bilateral Filtering

While gaussian filtering smooths pixel intensities regardless of image content, bilateral filtering seeks to provide edge-aware smoothing, preserving edges that would otherwise become blurred. The bilateral filter achieves edge-aware smoothing by combining a spatial gaussian with an intensity gaussian, weighting each pixel not only by its distance from the center of the filter kernel, but also by its intensity difference with the original pixel. Thus, pixel values that are substantially different from the original value, suggesting an edge, are given very little weight. Bilateral filtering improves detail enhancement methods, avoiding the edge 'halos' that result from the use of simple gaussian filters.

bilat.jpg

Effects of a bilateral filter: edge-aware smoothing.


Results

HDR Images

The results of the HDR algorithm are displayed below. The algorithm performed best for scenes that exhibited a consistent range. The algorithm performed worse on images such as the room with the bright desk lamp, since the point of extreme radiance sharply contrasted with the intensities throughout the rest of the image, and likely the lightbulb was over-exposed in most of the image set. Other images displayed less than ideal results due to misalignment, revealing a weakness of HDR photography, in that the scene must remain static across the entire image set. Otherwise, the reconstructed function g() will be inaccurate, and the final image will have noticeable artifacts.

window_rad.png window_B.png window_D.png

Radiance Map

Bilateral Filtered Image

Detail Layer

window_g.png window_global_simple.png window_durand.png

Exposure to Pixel Value Function

Global Tone-Mapping (log)

Local Tone-Mapping (Durand)

arch_rad.png arch_B.png arch_D.png

Radiance Map

Bilateral Filtered Image

Detail Layer

arch_g.png arch_global_simple.png arch_durand.png

Exposure to Pixel Value Function

Global Tone-Mapping (log)

Local Tone-Mapping (Durand)

bonsai_rad.png bonsai_B.png bonsai_D.png

Radiance Map

Bilateral Filtered Image

Detail Layer

bonsai_g.png bonsai_global_simple.png bonsai_durand.png

Exposure to Pixel Value Function

Global Tone-Mapping (log)

Local Tone-Mapping (Durand)

garage_rad.png garage_B.png garage_D.png

Radiance Map

Bilateral Filtered Image

Detail Layer

garage_g.png garage_global_simple.png garage_durand.png

Exposure to Pixel Value Function

Global Tone-Mapping (log)

Local Tone-Mapping (Durand)

house_rad.png house_B.png house_D.png

Radiance Map

Bilateral Filtered Image

Detail Layer

house_g.png house_global_simple.png house_durand.png

Exposure to Pixel Value Function

Global Tone-Mapping (log)

Local Tone-Mapping (Durand)

mug_rad.png mug_B.png mug_D.png

Radiance Map

Bilateral Filtered Image

Detail Layer

mug_g.png mug_global_simple.png mug_durand.png

Exposure to Pixel Value Function

Global Tone-Mapping (log)

Local Tone-Mapping (Durand)

garden_rad.png garden_B.png garden_D.png

Radiance Map

Bilateral Filtered Image

Detail Layer

garden_g.png garden_global_simple.png garden_durand.png

Exposure to Pixel Value Function

Global Tone-Mapping (log)

Local Tone-Mapping (Durand)

chapel_rad.png chapel_B.png chapel_D.png

Radiance Map

Bilateral Filtered Image

Detail Layer

chapel_g.png chapel_global_simple.png chapel_durand.png

Exposure to Pixel Value Function

Global Tone-Mapping (log)

Local Tone-Mapping (Durand)