i
i
i
i
i
i
i
i
23.10. Other Approaches 617
Figure 23.27. Sigmoidal compression (left) and sigmoidal compression using bilateral
filtering to compute the semi-saturation constant (right). Note the improved contrast in the
sky in the right image.
gories. The simplest of these are variations of logarithmic compression, and the
other is a histogram-based approach.
Dynamic range reduction may be accomplished by taking the logarithm, pro-
vided that this number is greater than 1. Any positive number may then be non-
linearly scaled between 0 and 1 using the following equation:
L
d
(x, y)=
log
b
(1 + L
v
(x, y))
log
b
(1 + L
max
)
While the base b of the logarithm above is not specied, any choice of base will
do. This freedom to choose the base of the logarithm may be used to vary the
base with input luminance, and thus achieve an operator that is better matched to
the image being compressed (Drago et al., 2003). This method uses Perlin and
Hoffert’s bias function which takes user parameter p (Perlin & Hoffert, 1989):
bias
p
(x)=x
log
10
(p)/ log
10
(1/2)
.
Figure 23.28. Logarithmic compression using base 10 logarithms (left) and logarithmic
compression with varying base (right).
i
i
i
i
i
i
i
i
618 23. Tone Reproduction
Making the base b dependent on luminance and smoothly interpolating bases be-
tween 2 and 10, the logarithmic mapping above may be rened:
L
d
(x, y)=
log
10
(1 + L
v
(x, y))
log
10
(1 + L
max
)
·
1
log
10
&
2+8
&
L
v
(x, y)
L
max
log
10
(p)/ log
10
(1/2)
''
.
For user parameter p, an initial value of around 0.85 tends to yield plausible results
(Figure 23.28 (right)).
Alternatively,tone reproduction may be based on histogramequalization. Tra-
ditional histogram equalization aims to give each luminance value equal probabil-
ity of occurrence in the output image. Greg Ward renes this method in a manner
that preserves contrast (Ward Larson et al., 1997).
First, a histogram is computed from the luminances in the high dynamic range
image. From this histogram, a cumulative histogram is computed such that each
bin contains the number of pixels that have a luminance value less than or equal
to the luminance value that the bin represents. The cumulative histogram is a
monotonically increasing function. Plotting the values in each bin against the
luminance values represented by each bin therefore yields a function which may
be viewed as a luminance mapping function. Scaling this function, such that the
vertical axis spans the range of the display device, yields a tone reproduction
operator. This technique is called histogram equalization.
Ward further rened this method by ensuring that the gradient of this function
never exceeds 1. This means, that if the difference between neighboring values
in the cumulative histogram is too large, this difference is clamped to 1.This
avoids the problem that small changes in luminance in the input may yield large
differences in the output image. In other words, by limiting the gradient of the
cumulative histogram to 1, contrast is never exaggerated. The resulting algorithm
is called histogram adjustment (see Figure 23.29).
Figure 23.29. A linearly scaled image (left) and a histogram adjusted image (right).
Image
created with the kind permission of the Albin Polasek museum, Winter Park, Florida.
i
i
i
i
i
i
i
i
23.11. Night Tonemapping 619
23.11 Night Tonemapping
The tone reproduction operators discussed so far nearly all assume that the im-
age represents a scene under photopic viewing conditions, i.e., as seen at normal
light levels. For scotopic scenes, i.e., very dark scenes, the human visual system
exhibits distinctly different behavior. In particular, perceived contrast is lower,
visual acuity (i.e., the smallest detail that we can distinguish) is lower, and every-
thing has a slightly blue appearance.
To allow such images to be viewed correctly on monitors placed in photopic
lighting conditions, we may preprocess the image such that it appears as if we
were adapted to a very dark viewing environment. Such preprocessing frequently
takes the form of a reduction in brightness and contrast, desaturation of the image,
blue shift, and a reduction in visual acuity (Thompson et al., 2002).
A typical approach starts by converting the image from RGB to XYZ. Then,
scotopic luminance V may be computed for each pixel:
V = Y
1.33
1+
Y + Z
X
1.68
.
This single channel image may then be scaled and multiplied by an em-
pirically chosen bluish gray. An example is shown in Figure 23.30. If some
Figure 23.30. Simulated night scene using
the image shown in Figure 23.12. (See also
Plates XV and XIX.)
pixels are in the photopic range, then
the night image may be created by lin-
early blending the bluish gray image
with the input image. The fraction to
use for each pixel depends on V .
Loss of visual acuity may be mod-
elled by low-pass ltering the night im-
age, although this would give an incor-
rect sense of blurriness. A better ap-
proach is to apply a bilateral lter to re-
tain sharp edges while blurring smaller
details (Tomasi & Manduchi, 1998).
Finally, the color transfer technique
outlined in Section 23.3 may also be used to transform a day-lit image into a
night scene. The effectiveness of this approach depends on the availability of a
suitable night image from which to transfer colors. As an example, the image in
Figure 23.12 is transformed into a night image in Figure 23.31.
i
i
i
i
i
i
i
i
620 23. Tone Reproduction
Figure 23.31. The image on the left is used to transform the image of Figure 23.12 into a
night scene, shown here on the right. (See also Plate XVIII.)
23.12 Discussion
Since global illumination algorithms naturally produce high dynamic range im-
ages, direct display of the resulting images is not possible. Rather than resort to
linear scaling or clamping, a tone reproduction operator should be used. Any tone
reproduction operator is better than using no tone reproduction. Dependent on the
requirements of the application, one of several operators may be suitable.
For instance, real-time rendering applications should probably resort to a sim-
ple sigmoidal compression, since these are fast enough to also run in real time.
In addition, their visual quality is often good enough. The histogram adjustment
technique (Ward Larson et al., 1997) may also be fast enough for real-time oper-
ation.
For scenes containing a very high dynamic range, better compression may
be achieved with a local operator. However, the computational cost is frequently
substantially higher, leaving these operators suitable only for non-interactive ap-
plications. Among the fastest of the local operators is the bilateral lter due to the
optimizations afforded by this technique (Durand & Dorsey, 2002).
This lter is interesting as a tone reproduction operator by itself, or it may
be used to compute a local adaptation level for use in a sigmoidal compression
function. In either case, the lter respects sharp contrast changes and smoothes
over smaller contrasts. This is an important feature that helps minimize halo
artifacts which are a common problem with local operators.
An alternative approach to minimize halo artifacts is the scale selection mech-
anism used in the photographic tone reproduction operator (Reinhard et al., 2002),
although this technique is slower to compute.
In summary, while a large number of tone reproduction operators is cur-
rently available, only a small number of fundamentally different approaches exist.
Fourier-domain and gradient-domain operators are both rooted in knowledge of
i
i
i
i
i
i
i
i
23.12. Discussion 621
image formation. Spatial-domain operators are either spatially variant (local) or
global in nature. These operators are usually based on insights gained from study-
ing the human visual system (and the visual system of many other species).
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.48.116