CS766 Computer Vision, Fall 2008

Project 1: High Dynamic Range Imaging

Assigned: Sept 11, 2008

Due: Sept 25 noon, 2008

The instructor is extremely thankful to Prof Yung-Yu Chuang for allowing us to use this project which was developed in his Digital Visual Effects class.

Project Description

High dynamic range (HDR) images have much larger dynamic range than traditional images' 256 brightness levels. In addition, they correspond linearly to physical irradiance values of the scene. Hence, they have many applications in graphics and vision. In this project, you are expected to finish the following tasks to assemble an HDR image.

1. Taking images. Taking a series of photographs for a scene under different exposures. As discussed in the class, changing shutter speed is probably the best way to change exposure for this application. For that, you need a digital camera that allows you to set exposures. (Note that not every camera allows a user to manually set exposures.) You can use your own camera or borrow a Canon PowerShot A640 or Canon PowerShot SX110 from us. If you need to borrow one camera, please check out the schedule and send TA an email. We suggest that you use a tripod when you take pictures. Again, you can use your own or borrow one from the TA. We would also provide flash memory. However, you should bring your own batteries (4x AA Batteries, Alkaline Ni-MH) to operate the camera. 

One thing to note is that you should avoid moving your camera during this process so that all pictures are well registered. Some digital cameras have their own programs which allow users to remotely control the shutters via their USB cables. Using such programs prevent you from shaking the camera while pressing the shutter. For some Canon camera models, there are third party programs, for example, AHDRIA, which allow you to set exposures and release shutter remotely from a PC or a laptop. Cameras of other brands might have a similar solution for remote capturing, but you have to discover on your own. You are welcome to write down your findings for that matter in your report.

If you decide to manually change exposures, it would help if you align your images before proceeding to the next step. Photomatix has a free version for HDR creation and image alignment, Photomatix Pro 2.5.2. RASCAL also has a utility called imageAlignment for aligning images. You can download from their website. You are also welcome to write a program for alignment as bonus points. A good candidate is the median threshold bitmap we discussed in the class.

2. Write a program to assemble an HDR image. Write a program to take these captured images as inputs and output an HDR image as well as the response curve of the camera. We provide a C++ image class called gil which supports I/O for many image formats for both unsigned-char images and float-point images. Click here to download the gil library and source code showing you how to use it (this is a new version which should work on CSL Windows machines). To compile and build the code in MS Visual Studio, you may need to change the "Include" and "Library" directory settings for the gil library. We recommend that you output your radiance map as a Radiance RGBE image (.hdr), which is implemented in gil already. We do not support gil in linux. You can choose to work in Linux, but you need to find your own image libray for image I/O. You can also choose to use Java or Matlab.

You will use Debevec's method. Please refer to Debevec's SIGGRAPH 1997 paper. The details of this algorithm has been discussed in class. The most difficult part probably is to solve the over-determined linear system. You can use these packages, GSL, Boost, LAPACK, LAPACK++, ATLAS, or write your own solver. (I recommended you to use LAPACK.) If you use Matlab, you do not need to write your solver because Matlab provides one. In fact, Matlab has already implemented the Debevec's HDR algorithm. You can work in matlab to simplify image I/O issues, but you need to use Matlab's basic functions to reimplement this algorithm. I trust you that you will not just blindly copy the example code on lecture slides. You can refer to Chapter 2 of Numerical Recipes if you want to write your own linear solver.

If you want to test your program before taking pictures of your own, you can download test images from here, from Debevec, or from Photomatix.

3. Develop your radiance map using tone mapping. Load your radiance map into HDRShop and use Reinhard's tone mapping algorithm to develop your radiance map into a usual image. Reinhard's algorithm has been implemented as a free HDRShop plugin. Optionally, you are welcome to write other tone mapping algorithms, preferably in HDRShop plugin format. You can refer to this page to learn how to write a plugin for HDRShop. Implementing tone mapping will be counted as a bonus since it is not required.

Here are several other options for tone mapping: Photomatix (algorithm unknown) and logview. The following two tone mapping programs are for Linux only: Fast Bilateral Filtering and PFStmo (seven algorithms implemented).

Bonus Points

Students will get extra points if they implement any of the following extensions. Please note that the basic requirement for this project is pretty simple. It is strongly recommended that you implement at least one of these extensions, especially if you work in groups.

You are welcome to do any other extensions or develop algorithm related to high dynamic range images. The bonus depends on how useful and difficult these extensions are.

Groups

Two students can form a group to do this project. If you are really low on time, you can have a group of three people. If you really want to practice on everything, you can do it individually. A group of four or more students is unacceptable.

Submission

Reference software

References

  1. HDD
  2. Alignment
  3. Tone Mapping