CS129 / Project 5 / HDR

This project is to construct high dynamic range (HDR) images from a set of photos. As input, we have as input a set of pictures such as the following, which are photos of the same scene taken with varying exposures:

Step 1: Radiance Map

To construct the HDR images, we must perform two tasks. First, using the input images, we must reconstruct the radiance map of the image. The radiance map is a matrix, the same dimensions as the input image, with values corresponding to the calculated radiance at that point. The image to the right is an example of a radiance map.

Calculating the radiance map consists of determining the pixel response curve. We do this by sampling the input images and constructing an over-determined system of linear equations, which we then solve. For example, the cathedral images above have the following response curve:

Step 2: Tone Mapping

The second part of the project is to take the radiance map for the image and then scale it in some sort of fashion so that all parts of the radiance map are visible. The image to the right shows a naive attempt at simple linear scaling between pixel values of 0 and 255. It is immediately obvious though, that this image is far too dark. This is because radiance values are logarithmic; bright areas of an image are orders of magnitude more radiant than dark areas.

An obvious next solution therefore is to visualize the logarithm of the radiance map instead. The image to the right shows a simple logarithm applied to radiance map values, followed by scaling between 0 and 1. This does indeed give a nice image, though some of the details are less clear due to the large range of intensities that must be displayed.

A third solution is to apply a local tone mapping operator. In this case, I have implemented a simplified version of the bilateral filter method introduced in Durand 2002. The bilateral filter is used to separate out the high level structure of the image from the detail, and we can then emphasise the detail in the resulting image more. As can be seen in the results, the colours and details are more vivid.

The following table shows the results for a number of source images. I also illustrate the structure and detail of the images

Example input imageGlobalSimpleDurandStructureDetail