top of page

Problem With Debevec and Malik Method

I performed this procedure on several sets of images, and discovered that some had an interesting artifact appearing in them.  The common factor was the presence of extremely strong light, near the position of the sun.  My camera’s maximum shutter speed is 1/8000 s, which is great but not nearly fast enough for these pixels not to be saturated.  

Reason Behind These Artifacts

It took a long time to work out why this was happening.  It turns out that their suggestion for constructing the high dynamic radiance map allows for pixels that are saturated in all exposures to be calculated to be a lower radiance, despite the fact that all images attest to this pixel's extreme brightness.

​

Let's begin with a brief explanation of the method they propose for creating the irradiance map based on the reverse log function g() of the camera response curve.

Process of Irradiance Calculation as proposed by Debevec and Malik

The formula for calculating the log of the irradiance  (Ei) of any pixel is expressed by the following formula:

​

​

​

​

 

The weight function that they suggest is a simple one:

As we examine two points going through this process, we discover the reason behind this strange calculation.

​

Take two points, point 1 and point 2, across 10 exposures.  Point 1 is saturated in all but two images, while point 2 is saturated in all images (perhaps it was close to the sun in the image). At the start, with the reverse of the camera response curve applied, their totals across the images are accurate - the second image has a higher number.  

The next steps are to subtract the ln of the exposure time for that image, and apply the weights:

After the weights are applied, the final  ln irradiance is calculated to be lower for the second point!  If you examine the above numbers, it becomes evident that weighing the numbers after they have been adjusted amplifies the adjustment too much.

My Solution: Apply Weights Before Adjusting

If the weights are amplifying the adjustment, then I swapped the equation around to apply the weights after adjustment.  

Their formula:​

​

​

​

​

My formula:

This method produced results that were free of the artifacts around saturated pixels.  

​

However, it produces images with a higher dynamic range, which look rather flat when tonemapped down to a viewing range.  

Mixed method

I decided to combine the approaches.  Here is an example on just the green color channel.  After tone mapping, I took the difference between the two method results to see where they differ.

 

Then I extracted the pixels where the average across the images were greater than some threshold – here I chose 200.

​

I finally combined them and saw that I have found the region of interest - the odd place where those artifacts appear.

 

So I decided to keep the pixels from the original method and replace the pixels resulting from the modified formula at this region only.

Difference of the two methods

Average of images > 200

Where both are true

Results

The results are not perfect, but certainly better than those of each individual method.

© 2018 by Samareh Shahmohammadi. 

bottom of page