CS766: Computer Vision




COURSE PROJECT



Project 1: High Dynamic Range Imaging









Ba-Quy Vuong


(baquy@cs.wisc.edu)

Department of Computer Sciences

UW-Madison










1. Introduction

Regular images only have 256 levels of brightness for each color channel. This is far below the viewing capability of human eyes. High dynamic range images have much higher dynamic range. However, traditional cameras are incapable of capturing those high dynamic range images. In this project, we aim to recover the high dynamic range images of a scene by using a regular camera. We first take pictures of that scene with various exposures. We then develop a computer program to combine these images and produce the high dynamic range image. In this report, we are going to discuss the implementations of two algorithms:

2. The overall process

The process of recovering high dynamic images basically consists of three steps:

3. Radiance maps algorithm

3.1. Overall idea

Each camera has a response function which relates the exposure at an pixel to its color. Due to the camera's sensitivity, too low or too high exposures are mapped to the same color. Our target is to recover the exposure that each pixel receives. In order to do that, we need to know the response function. The radiance map algorithm recovers this function as follows.

3.2. Implementation

The algorithm is implemented as follows:



3.3. Results

The result we achieved is very optimistic. We were able to recover high dynamic range images. After tone mapping, we can see a very detailed pictures. The recovered response curve for each channel is shown in the following figure. We can see that they are very similar to those presented in the paper by Debevec. That means the algorithm has been implemented correctly.

The read channel response curve (Y axis: pixel value, X axis: log of the exposure)

The green channel response curve (Y axis: pixel value, X axis: log of the exposure)

The blue channel response curve (Y axis: pixel value, X axis: log of the exposure)

4. Extension: Median Bitmap Threshold (MBT) algorithm

4.1. Overall idea

Assume we have two images to align. For each image, the algorithm first takes the median value of all the pixels and constructs a median bitmap, in which a value 0 corresponds to a pixel value in the original image that is greater than the threshold and a value 1 otherwise. Basically, if we “and” the two median bitmaps, we will get the difference of the two original images. The smaller this difference is, the better the two images match. As the pixels whose values are close to the thresholds are very sensitive, we do not want to consider them. Thus, an exclusive bitmap is created by setting all the pixel whose values are close to the thresholds to zero and setting to one otherwise. This exclusion bitmap is then “anded” with the median bitmaps to get a better comparison.

To improve the efficiency, a pyramid of images is generated. In this pyramid, the size of each image is halved. The algorithm starts from the top of the pyramid where images have the smallest sizes. It compares the two images at each level of the pyramid and derives the corresponding bit of the distance between two original images. After the two images at the bottom of the pyramid are compared, the algorithm returns the values in X and Y coordinates that the second image needs to shift in order to match the first image.

4.2. Implementation

To simulate the operation of the pyramid mechanism, we developed a recursive function that recursively moves along the pyramid and constructs appropriate bits. There are a number of support functions that we created. For example, we needed to resize images, construct median bitmaps and exclusive bitmaps.

4.3. Results

The result of this algorithm is pretty good. It is able to shift images so that they are aligned with each other. However, a main drawback of this method is the efficiency. Although the pyramid mechanism has been used to speed up the algorithm, it is still very slow, especially with large images. This is because there are many operations need to be done on images in order to compare them.

5. Lessons

6. References

[1] Paul E. Debevec, Jitendra Malik, Recovering High Dynamic Range Radiance Maps from Photographs, SIGGRAPH 1997

[2] Greg Ward, Fast Robust Image Registration for Compositing High Dynamic Range Photographs from Hand-Held Exposures, jgt, 2003.

[3] http:// lapackpp.sourceforge.net/