Skip to content Skip to navigation

Connexions

You are here: Home » Content » Exploring High Dynamic Range Imaging: §3.6 Reinhard’s Gaussian Convolution Method

Navigation

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual Connexions member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • Rice University ELEC 301 Projects

    This module is included inLens: Rice University ELEC 301 Project Lens
    By: Rice University ELEC 301As a part of collection:"ELEC 301 Projects Fall 2006"

    Click the "Rice University ELEC 301 Projects" link to see all content affiliated with them.

Recently Viewed

This feature requires Javascript to be enabled.

Exploring High Dynamic Range Imaging: §3.6 Reinhard’s Gaussian Convolution Method

Module by: Robert Ortman, Taylor Johnson, Sarah McGee, Tianhe Yang. E-mail the authors

User rating (How does the rating system work?)
Ratings

Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

How to rate a module

Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

:
(0 ratings)

An implementation suggested by Reinhard in “Photographic Tone Reproduction for Digital Images,” involves constructing circularly symmetric Gaussians of eight varying scales and convolving them (via multiplication in the frequency domain for speed improvement) with the image luminance values, which results in the production of eight Gaussain-blurred versions of the image with different degrees of blurring.

The equation used for the Gaussians is:

Figure 1
Figure 1 (Graphic1.png)

(Reinhard et al., 4)

The normalized error function for the difference between the image at one scale of blurriness and the next is iteratively evaluated at successive scale values, sm, where s = 1.6^Sm, until its absolute value exceeds the threshold of 0.05. The scale value one less than that causing the threshold to be exceeded (if sm=1 exceeds the threshold, the 1 is still kept) is then stored in the scale matrix, Sm(x,y). The paper provided a suggested threshold value of 0.05 that seemed to work well for most images although others were tried. The function below is evaluated at every pixel in the image, and a scale value is determined for each pixel, ranging from 1 to 8. The value for alpha1 is taken to be 0.3536 (approximation of 1/(2*sqrt(2))) par recommendation from the paper, and alpha2 is set to 1.6*alpha1 = 0.5657.

The equation used to construct the Sm matrix:

Figure 2
Figure 2 (Graphic2.png)

where |V| < 0.05 (Reinhard et al., 4).

Phi = 8.0 and a is the key value, set to 0.18 for most images. These values were suggested by the paper and adjusted to understand their effects, but phi = 8.0 was used for all final test images. The average luminance of the image tends to suggest the key value, a. In practice, it should be varied from about 0.09 to 0.36 (or sometimes more) for some darker or lighter photographs, respectively. The Vi values for i=1 and i=2, as used above, are calculated via convolution of the luminance values with the Ri Gaussians defined in the R(x,y,z) equation above. The equation representing this convolution is: Vi(x,y,s) = L(x,y) * Ri(x,y,s) (Reinhard et al., 4).

To produce the final image, the formula,

Figure 3
Figure 3 (Graphic3.png)

is evaluated over all x and y values of possible image positions (Reinhard et al., 4). The algorithm ultimately accomplishes a greater reduction in brightness for regions especially bright and a greater increase in brightness for regions that are especially dark. For example, for a dark pixel in a relatively luminescent region, L(x,y) < V1(x,y), therefore Ld(x,y) will decrease, increasing the contrast at that point. On the other hand, a bright pixel in a darker region will cause L(x,y) > V1(x,y), therefore Ld(x,y) will increase, subsequently increasing the contrast for this case as well.

In an effort to improve the algorithm, we changed the Ld equation above to

Figure 4
Figure 4 (Graphic4.png)

where C are scaling coefficients that can give more weight to the brightening or darkening effect for V1 because, with some images, the effects are not strong enough with our original implementation of the algorithm. This is very effective on some images where regions with similar sm values have similar brightness, and the coefficients could be determined by hand or by another algorithm from the sm(x,y) matrix. On more complex images, Sm values correlate with similar brightness only on local regions so C(sm(x,y)) would have to also depend on x and y independent of sm and therefore become, C(sm(x,y),x,y).

Examples:

(Photo from nine-image set in “IRIS TUTORIAL: Comet High Dynamic Range imagery Application to total eclipse processing” -- http://www.astrosurf.com/buil/iris/tutorial19/doc41_us.htm)

Fig. 1: Global Linear Operator:

Figure 5
Figure 5 (Graphic5.png)

Fig. 2: Using original operator based on Reinhard paper (equivalent to C = {1,1,1,1,1,1,1,1}):

Figure 6
Figure 6 (Graphic6.png)

Fig. 3: Using final equation with C = {-2,-2,-1,4,4,4,4,4}:

Figure 7
Figure 7 (Graphic7.png)

Here, setting C to something different that {1,1,1,1,1,1,1,1} is rather effective at pulling down the extremely bright window even more. It works pretty well since the high-valued region of Sm(x,y) corresponds to a similar sm value in the same (x,y) rectangular-bounded region in all color channels.

Scale Matrix Examples (Longer wavelength color corresponds to higher Sm(x,y) value):

The images below show an example of how an HDR image of a window scene was broken into different scale regions by the algorithm: dark blue = 1, light blue = 2, cyan = 3, yellow = 4, orange = 5, and dark red = 6.

The Sm matrix values show how the overly bright window region was easily isolated with the C vector:

Fig. 4: Red:

Figure 8
Figure 8 (Graphic8.png)

Fig. 5: Green:

Figure 9
Figure 9 (Graphic9.png)

Fig. 6: Blue:

Figure 10
Figure 10 (Graphic10.png)

Example 2:

(Photo from three-image set taken by Robert Ortman in Banff National Park, Canada)

Fig. 7: Global Linear Operator:

Figure 11
Figure 11 (Graphic11.png)

Fig. 8: Using original operator based on Reinhard paper (equivalent to C = {1,1,1,1,1,1,1,1}):

Figure 12
Figure 12 (Graphic12.png)

Fig. 9: Using final equation with C = {1 1 1 1.5 4 4 4 4}:

Figure 13
Figure 13 (Graphic13.png)

In this case, the operator based on the paper renders the grass and trees part better since it increases the luminance in those regions relatively well, but it does worse than the global linear operator on the clouds: it has not decreased luminance nearly enough in that region. Attempting to use the C vector to help reduce extra cloud luminance also fails here because the Sm regions computed for the clouds do not correspond very well for across color channels. In particular, the blue channel had a clearly high-valued region that could have it’s brightness selectively reduced, but applying this equally across all color channels results in discoloration. Applying the increased weight of luminance reduction to the regions represented in yellow and orange below across all color channels darkens blue (the most) and red much more than green, leaving the green and yellow (red+green) patches showed above.

The Sm matrix values clearly explain the discoloration:

Red:

Figure 14
Figure 14 (Graphic14.png)

Green:

Figure 15
Figure 15 (Graphic15.png)

Blue:

Figure 16
Figure 16 (Graphic16.png)

In both example photos above, the operator based on the Reinhard paper tended to outperform the global linear operator in some parts and fail in others. In some cases, it can be easy to fix with the introduction of the C vector, but ultimately, there must be a better way.

Content actions

Give Feedback:

E-mail the module authors | Rate module ( How does the rating system work?)

Rating system

Ratings

Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

How to rate a module

Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

(0 ratings)

Download:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.

| A lens (?)

Definition of a lens

Lenses

A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual Connexions member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks