Report of Project 1
Name: Lijie Heng
Date: Sep 25th, 2007
Goal
The goal of this project is to create a high dynamic range image from a serial of low dynamic images with different exposure times.
We are using Paul E. Debevec's algorithem to find the response curve and recover the irradiance map
How did I complete each step
Taking Pictures
Three groups of images(see the project folder submitted) were taken for this project; photo3 is indoor scene, photo2 is the outdoor scene, and photo1 is outdoor scene with moving cars inside. All the pictures are taken by Canon PowerShot A640 using a tripod. Since the exposure times are changed remotely from a laptop, in AHDRIA, basically we could suppose that there is no shift between pictures.
One thing needs noticing is that AHDRIA always uses the highest quality(biggest size) of a camera, when taking pictures. For A640, the size of the pictures taken is 3648*2736, which may cost a longer time for the programm to process the pictures. To solve this problem, I resized each picture I took to %25 of their original size.
Create an HDR image
First, Debevec's method was used in this project to find the response curve and the irradiance map. To solve the over-determined linear system A*x = b, I used the matrix SVD decomposition method by referring Numerical Recipes. I got my own solver on the base of the code provided in this book.
In order to read and write the images, I used the gil lib recommended on the project webpage. After I got the data of g(i), the response curve graphs were generated in Matlab. The irradiance map was saved into an .hdr file.
Tone Mapping
The .hdr files were read into Photomatix and tone mapping was done on the .hrd files in Photomatix before they were saved as .jpg images.
I also tried to do the tone mapping using Drago's adaptive logarithmic mapping method, which is pretty good too.
Results I got
Response Curves
The response curve I got from the sample image-exposures is like this.The five tone mapping images are created, two from sample image sets, three from my own image sets. All images could be found in the project/result_image folder. Two examples are as follows:
Alignment
If there is any moving object in the images, it is hard to recover the image caputuring the moving objects clearly. To show this, I took a image set photo1, which contains the moving cars on the W. Johnson Street. Without alignment, I got Picture 1, which is blurred on the cars. Picture 2 is got after doing the alignment in Photomatix. It is much clearer than Picture 1.Picture 1
Picture 2
Tone Mapping
Drago's adaptive logarithmic mapping method was used to do the tone mapping(some modifications added on the code downloaded online). We can see that the result is not as good as the method used in Photomatix.
How to run the program
Step 1: run main.cpp in Visual Studio 2005 to generate the .hrd file using release mode(added the gil into the lib).Favorite Artifacts
View on CampusSummary
The whole program works pretty well, though the images generated are not perfect. The resized pictures are not clear enough before putting into the program to generate the HDR image, which affected the HDR image generated. Another point is that I went though the alignment algorithem. It is not that hard, but not enough time to finish the implementation.It was my first time to process images, but it is an interesting experience and I learned a lot. Although it cost me lots of time, it worth time.