Tone mapping
   HOME

TheInfoList



OR:

Tone mapping is a technique used in
image processing An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey information. An image can be an artifact, such as a photograph or other two-dimensio ...
and
computer graphics Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great de ...
to
map A map is a symbolic depiction emphasizing relationships between elements of some space, such as objects, regions, or themes. Many maps are static, fixed to paper or some other durable medium, while others are dynamic or interactive. Although ...
one set of colors to another to approximate the appearance of high-dynamic-range images in a medium that has a more limited
dynamic range Dynamic range (abbreviated DR, DNR, or DYR) is the ratio between the largest and smallest values that a certain quantity can assume. It is often used in the context of signals, like sound and light. It is measured either as a ratio or as a base ...
. Print-outs, CRT or LCD monitors, and projectors all have a limited dynamic range that is inadequate to reproduce the full range of light intensities present in natural scenes. Tone mapping addresses the problem of strong contrast reduction from the scene
radiance In radiometry, radiance is the radiant flux emitted, reflected, transmitted or received by a given surface, per unit solid angle per unit projected area. Radiance is used to characterize diffuse emission and reflection of electromagnetic radiati ...
to the displayable range while preserving the image details and color appearance important to appreciate the original scene content. Inverse tone mapping is the inverse technique that allows to expand the luminance range, mapping a low dynamic range image into a higher dynamic range image. It is notably used to upscale SDR videos to HDR videos.


Background

The introduction of film-based photography created issues since capturing the enormous dynamic range of lighting from the real world on a chemically limited negative was very difficult. Early film developers attempted to remedy this issue by designing the film stocks and the print development systems that gave a desired S-shaped tone curve with slightly enhanced contrast (about 15%) in the middle range and gradually compressed highlights and shadows . The advent of the Zone System, which bases exposure on the desired shadow tones along with varying the length of time spent in the chemical developer (thus controlling highlight tones) extended the tonal range of black and white (and later, color) negative film from its native range of about seven stops to about ten. Photographers have also used
dodging and burning Dodging and burning are terms used in photography for a technique used during the printing process to manipulate the exposure of select areas on a photographic print, deviating from the rest of the image's exposure. In a darkroom print from a fi ...
to overcome the limitations of the print process . The advent of digital photography gave hope for better solutions to this problem. One of the earliest algorithms employed by Land and McCann in 1971 was Retinex, inspired by theories of lightness perception .This method is inspired by the eye’s biological mechanisms of adaptation when lighting conditions are an issue. Gamut mapping algorithms were also extensively studied in the context of color printing. Computational models such as CIECAM02 or iCAM were used to predict color appearance. Despite this, if algorithms could not sufficiently map tones and colors, a skilled artist was still needed, as is the case with cinematographic movie post-processing. Computer graphic techniques capable of rendering high-contrast scenes shifted the focus from color to luminance as the main limiting factor of display devices. Several tone mapping operators were developed to map high dynamic range (HDR) images to standard displays. More recently, this work has branched away from utilizing luminance to extend image contrast and towards other methods such as user-assisted image reproduction. Currently, image reproduction has shifted towards display-driven solutions since displays now possess advanced image processing algorithms that help adapt rendering of the image to viewing conditions, save power, up-scale color gamut and dynamic range.


Purpose and methods

The goals of tone mapping can be differently stated depending on the particular application. In some cases producing just aesthetically pleasing images is the main goal, while other applications might emphasize reproducing as many image details as possible, or maximizing the image contrast. The goal in realistic rendering applications might be to obtain a perceptual match between a real scene and a displayed image even though the display device is not able to reproduce the full range of luminance values. Various tone mapping operators have been developed in the recent years. They all can be divided in two main types: *''global'' (or ''spatially uniform'') operators: they are non-linear functions based on the luminance and other global variables of the image. Once the optimal function has been estimated according to the particular image, every pixel in the image is mapped in the same way, independent of the value of surrounding pixels in the image. Those techniques are simple and fast (since they can be implemented using
look-up table In computer science, a lookup table (LUT) is an array that replaces runtime computation with a simpler array indexing operation. The process is termed as "direct addressing" and LUTs differ from hash tables in a way that, to retrieve a value v w ...
s), but they can cause a loss of contrast. Examples of common global tone mapping methods are contrast reduction and color inversion. *''local'' (or ''spatially varying'') operators: the parameters of the non-linear function change in each pixel, according to features extracted from the surrounding parameters. In other words, the effect of the algorithm changes in each pixel according to the local features of the image. Those algorithms are more complicated than the global ones; they can show artifacts (e.g. halo effect and ringing); and the output can look unrealistic, but they can (if used correctly) provide the best performance, since human vision is mainly sensitive to local contrast. A simple example of global tone mapping filter is V_=\frac (Reinhard), where ''V''in is the
luminance Luminance is a photometric measure of the luminous intensity per unit area of light travelling in a given direction. It describes the amount of light that passes through, is emitted from, or is reflected from a particular area, and falls with ...
of the original pixel and ''V''out is the luminance of the filtered pixel. This function will map the luminance ''V''in in the domain contrast for parts of the image with low luminance (particularly when ), parts of the image with higher luminance will get increasingly lower contrast as the luminance of the filtered image goes to 1. Variations on this filter are commonly used in rendering. A perhaps more useful global tone mapping method is gamma compression, which has the filter V_=A\,V_^, where and . This function will map the luminance ''V'' in the domain [0,A^] to the output range [0,1]. ''γ'' regulates the contrast of the image; a lower value for lower contrast. While a lower constant ''γ'' gives a lower contrast and perhaps also a duller image, it increases the exposure of underexposed parts of the image while at the same time, if , it can decrease the exposure of overexposed parts of the image enough to prevent them from being overexposed. An even more sophisticated group of tone mapping algorithms is based on contrast or gradient domain methods, which are 'local'. Such operators concentrate on preserving contrast between neighboring regions rather than absolute value, an approach motivated by the fact that the human perception is most sensitive to contrast in images rather than absolute intensities. Those tone mapping methods usually produce very sharp images, which preserve very well small contrast details; however, this is often done at the cost of flattening an overall image contrast, and may as a side effect produce
halo Halo, halos or haloes usually refer to: * Halo (optical phenomenon) * Halo (religious iconography), a ring of light around the image of a head HALO, halo, halos or haloes may also refer to: Arts and entertainment Video games * ''Halo'' (franch ...
-like glows around dark objects. Examples of such tone mapping methods include:
gradient domain high dynamic range compression Gradient domain image processing, also called Poisson image editing, is a type of digital image processing that operates on the differences between neighboring pixels, rather than on the pixel values directly. Mathematically, an image gradient repre ...
and A Perceptual Framework for Contrast Processing of High Dynamic Range Images (a tone mapping is one of the applications of this framework). Another approach to tone mapping of HDR images is inspired by the
anchoring theory of lightness perception An anchor is a device, normally made of metal , used to secure a vessel to the bed of a body of water to prevent the craft from drifting due to wind or current. The word derives from Latin ''ancora'', which itself comes from the Greek ἄγ ...
. This theory explains many characteristics of the human visual system such as lightness constancy and its failures (as in the
checker shadow illusion The checker shadow illusion is an optical illusion published by Edward H. Adelson, professor of vision science at MIT in 1995. Description The image depicts a checkerboard with light and dark squares, partly shadowed by another object. The op ...
), which are important in the perception of images. The key concept of this tone mapping method (Lightness Perception in Tone Reproduction) is a decomposition of an HDR image into areas (frameworks) of consistent illumination and the local calculation of the lightness values. The net lightness of an image is calculated by merging of the frameworks proportionally to their strength. Particularly important is the anchoring—relating of the luminance to a known luminance, namely estimating which luminance value is perceived as white in the scene. This approach to tone mapping does not affect the local contrast and preserves the natural colors of an HDR image due to the linear handling of luminance. One simple form of tone mapping takes a standard image (not HDR – the dynamic range already compressed) and applies
unsharp masking Unsharp masking (USM) is an image sharpening technique, first implemented in darkroom photography, but now commonly used in digital image processing software. Its name derives from the fact that the technique uses a blurred, or "unsharp", negat ...
with a large radius, which increases local contrast rather than sharpening. See unsharp masking: local contrast enhancement for details. One of the commonly used tone mapping algorithms is the iCAM06 which is based on both the
color appearance model A color appearance model (CAM) is a mathematical model that seeks to describe the perceptual aspects of human color vision, i.e. viewing conditions under which the appearance of a color does not tally with the corresponding physical measurement o ...
and hierarchical mapping. After bilateral filtering, the image is broken into a base layer and a detail layer. White point adaptation and chrominance adaptation are applied to the base layer, while detail enhancement is applied to the detail layer. Eventually the two layers are merged and converted to the IPT color space. In general, this method is good but has some shortcomings, specifically in how computationally heavy the filtering method is. A proposed solution to this involves performance optimization of the filter. The base layer of the image is also converted to the RGB space for tone compression. This method also allows for more output adjustment and saturation enhancement, making it be less computationally intensive and better at reducing the overall halo effect.


Digital photography

Forms of tone mapping long precede digital photography. The manipulation of film and development process to render high contrast scenes, especially those shot in bright sunlight, on printing paper with a relatively low dynamic range, is effectively a form of tone mapping, although it is not usually called that. Local adjustment of tonality in film processing is primarily done via
dodging and burning Dodging and burning are terms used in photography for a technique used during the printing process to manipulate the exposure of select areas on a photographic print, deviating from the rest of the image's exposure. In a darkroom print from a fi ...
, and is particularly advocated by and associated with
Ansel Adams Ansel Easton Adams (February 20, 1902 – April 22, 1984) was an American landscape photographer and environmentalist known for his Monochrome photography, black-and-white images of the American West. He helped found Group f/64, an association ...
, as described in his book ''The Print;'' see also his Zone System. The normal process of
exposure compensation Exposure compensation is a technique for adjusting the exposure indicated by a photographic exposure meter, in consideration of factors that may cause the indicated exposure to result in a less-than-optimal image. Factors considered may include ...
, brightening shadows and altering contrast applied globally to digital images as part of a professional or serious amateur workflow is also a form of tone mapping. However, HDR tone mapping, usually using ''local operators,'' has become increasingly popular amongst digital photographers as a post-processing technique, where several exposures at different shutter speeds are combined to produce an HDR image and a tone mapping operator is then applied to the result. There are now many examples of locally tone mapped digital images, inaccurately known as "HDR photographs", on the internet, and these are of varying quality. This popularity is partly driven by the distinctive appearance of locally tone mapped images, which many people find attractive, and partly by a desire to capture high-contrast scenes that are hard or impossible to photograph in a single exposure, and may not render attractively even when they can be captured. Although digital sensors actually capture a higher dynamic range than film, they completely lose detail in extreme highlights, clipping them to pure white, producing an unattractive result when compared with negative film, which tends to retain color and some detail in highlights. In some cases local tone mapping is used even though the dynamic range of the source image could be captured on the target media, either to produce the distinctive appearance of a locally tone mapped image, or to produce an image closer to the photographer's artistic vision of the scene by removing sharp contrasts, which often look unattractive. In some cases, tone mapped images are produced from a single exposure which is then manipulated with conventional processing tools to produce the inputs to the HDR image generation process. This avoids the artifacts that can appear when different exposures are combined, due to moving objects in the scene or camera shake. However, when tone mapping is applied to a single exposure in this way, the intermediate image has only normal dynamic range, and the amount of shadow or highlight detail that can be rendered is only that which was captured in the original exposure.


Display devices

One of the original goals of tone mapping was to be able to reproduce a given scene or image onto a display device such that the brightness sensation of the image to a human viewer closely matches the real-world brightness sensation. However, a perfect match for this problem is never possible and thus the output image on a display is often built from a tradeoff between different image features. Choosing between features is often based on the necessary application, and given appropriate metrics for the application, one possible solution is to treat the issue as an optimization problem. For this method, models for the Human Visual System (HVS) and the display are first generated, along with a simple tone mapping operator. The contrast distortions are weighted according to their individual visibilities approximated by the HVS. With these models, an objective function that defines the tone curve can be created and solved using a fast quadratic solver. With the addition of filters, this method can also be extended to videos. The filters ensure that the rapid changing of the tone-curve between frames are not salient in the final output image.


Example of the imaging process

The images on the right show the interior of a church, a scene which has a variation in radiance much larger than that which can be displayed on a monitor or recorded by a conventional camera. The six individual exposures from the camera show the radiance of the scene in some range transformed to the range of brightnesses that can be displayed on a monitor. The range of radiances recorded in each photo is limited, so not all details can be displayed at once: for example, details of the dark church interior cannot be displayed at the same time as those of the bright stained-glass window. An algorithm is applied to the six images to recreate the high dynamic range radiance map of the original scene (a high dynamic range image). Alternatively, some higher-end consumer and specialist scientific digital cameras are able to record a high dynamic range image directly, for example with RAW images. In the ideal case, a camera might measure
luminance Luminance is a photometric measure of the luminous intensity per unit area of light travelling in a given direction. It describes the amount of light that passes through, is emitted from, or is reflected from a particular area, and falls with ...
directly and store this in the HDR image; however, most high dynamic range images produced by cameras today are not calibrated or even proportional to luminance, due to practical reasons such as cost and time required to measure accurate luminance values — it is often sufficient for artists to use multiple exposures to gain an "HDR image" which grossly approximates the true luminance signal. The high dynamic range image is passed to a tone mapping operator, in this case a local operator, which transforms the image into a low dynamic range image suitable for viewing on a monitor. Relative to the church interior, the stained-glass window is displayed at a much lower brightness than a linear mapping between scene radiance and pixel intensity would produce. However, this inaccuracy is perceptually less important than the image detail, which can now be shown in both the window and the church interior simultaneously. Local tone mapping technique of HDR image processing often produces a number of characteristic effects in images such as bright halos around dark objects, dark halos around bright objects, and sometimes a "cartoon-like" appearance due to extremely vivid colors and lack of large-scale color variations. These results are caused by application of geometric space distortion of captured image along with color space distortion, while only color space distortions are a tone mapping effect, and all other distortions are rather a custom filtering technique than any tone or color space mapping. So, the results of local tone mapping are often judged as perverting the nature of a documentalist photographic image and far from photographic realism. Not all tone mapped images are visually distinctive. Reducing dynamic range with tone mapping is often useful in bright sunlit scenes, where the difference in intensity between direct illumination and shadow is great. In these cases the global contrast of the scene is reduced, but the local contrast maintained, while the image as a whole continues to look natural. Use of tone mapping in this context may not be apparent from the final image: Image:Grand Canyon HDR imaging.jpg, Regions of direct illumination and shadow on the Grand Canyon Image:Bucket_of_fresh-picked_cherries.jpg File:Lamp base at N.Y. Public Library - Schwarzman Bldg. - exterior.jpg, Cartoon-like appearance Tone mapping can also produce distinctive visual effects in the final image, such as the visible halo around the tower in the Cornell Law School image below. It can be used to produce these effects even when the dynamic range of the original image is not particularly high. Halos in images come about because the local tone mapping operator will brighten areas around dark objects, to maintain the local contrast in the original image, which fools the human visual system into perceiving the dark objects as being dark, even if their actual luminance is the same as that of areas of the image perceived as being bright. Usually this effect is subtle, but if the contrasts in the original image are extreme, or the photographer deliberately sets the luminance gradient to be very steep, the halos become visible.


Gallery

Image:HDRToneMap.jpg, HDR tone mapping example Image:IsolaTiberinaHDR.jpg, Five exposure tone mapping of the Isola Tiberina in
Rome , established_title = Founded , established_date = 753 BC , founder = King Romulus ( legendary) , image_map = Map of comune of Rome (metropolitan city of Capital Rome, region Lazio, Italy).svg , map_caption ...
. Image:Machinery.jpg, 3 exposure (-2,0,+2) tone mapped image of a scene at
Nippori Station is a major railway interchange station in Arakawa, Tokyo, Japan. It is also adjacent to the Yanaka neighborhood of Taito district. Lines *East Japan Railway Company (JR East) ** Joban Line (Rapid) ** Keihin-Tohoku Line **Yamanote Line * Keise ...
. Image:View_from_tower_bridge_tonemapped.jpg, HDR view from
Tower Bridge Tower Bridge is a Grade I listed combined bascule and suspension bridge in London, built between 1886 and 1894, designed by Horace Jones and engineered by John Wolfe Barry with the help of Henry Marc Brunel. It crosses the River Thames clos ...
in
London London is the capital and List of urban areas in the United Kingdom, largest city of England and the United Kingdom, with a population of just under 9 million. It stands on the River Thames in south-east England at the head of a estuary dow ...
tone-mapped from five exposures. Image:StPauls_cathedral_tonemapped.jpg, HDR view from
St Paul's Cathedral St Paul's Cathedral is an Anglicanism, Anglican cathedral in London and is the seat of the Bishop of London. The cathedral serves as the mother church of the Diocese of London. It is on Ludgate Hill at the highest point of the City of London ...
in
London London is the capital and List of urban areas in the United Kingdom, largest city of England and the United Kingdom, with a population of just under 9 million. It stands on the River Thames in south-east England at the head of a estuary dow ...
tone-mapped from nine exposures. Image:CornellLawTower.jpg, Tone mapped composite image of the
Cornell Law School Cornell Law School is the law school of Cornell University, a private Ivy League university in Ithaca, New York. One of the five Ivy League law schools, it offers four law degree programs, JD, LLM, MSLS and JSD, along with several dual-deg ...
tower in
Ithaca, New York Ithaca is a city in the Finger Lakes region of New York, United States. Situated on the southern shore of Cayuga Lake, Ithaca is the seat of Tompkins County and the largest community in the Ithaca metropolitan statistical area. It is named ...
.


See also

*
Color translation In digital imaging systems, color management (or colour management) is the controlled Data conversion, conversion between the color representations of various devices, such as image scanners, digital cameras, monitors, TV screens, film printers, ...
*
Gamma correction Gamma correction or gamma is a nonlinear operation used to encode and decode luminance or tristimulus values in video or still image systems. Gamma correction is, in the simplest cases, defined by the following power-law expression: : V_\tex ...
*
Tone reproduction In the theory of photography, tone reproduction is the mapping of scene luminance and color to print reflectance or display luminance, with the aim of subjectively "properly" reproducing brightness and "brightness differences". The reproduction ...
* High dynamic range (HDR)


References

# Livingstone, M. 2002. "Vision and Art: The Biology of Seeing." Harry N Abrams # Hunt, R. 2004. "The Reproduction of Colour in Photography, Printing and Television: 6th Edition." John Wiley & Sons. # Adams, A. 1981. "The Print, The Ansel Adams Photography Series 3." New York Graphic Society # Land, E. H., and McCann, J. J. 1971. "Lightness and the retinex theory." Journal of the Optical Society of America 61, 1, 1–11. # Kate Devlin, Alan Chalmers, Alexander Wilkie, Werner Purgathofer. "STAR Report on Tone Reproduction and Physically Based Spectral Rendering" in
Eurographics Eurographics is a Europe-wide professional computer graphics association. The association supports its members in advancing the state of the art in computer graphics and related fields such as multimedia, scientific visualization and human–compu ...
2002. DOI
10.1145/1073204.1073242
# Raanan Fattal, Dani Lischinski, Michael Werman
"Gradient Domain High Dynamic Range Compression"
# Rafal Mantiuk, Karol Myszkowski, Hans-Peter Seidel
"A Perceptual Framework for Contrast Processing of High Dynamic Range Images"
# Alan Gilchrist
"An Anchoring Theory of Lightness Perception"
# Grzegorz Krawczyk, Karol Myszkowski, Hans-Peter Seidel
"Lightness Perception in Tone Reproduction for High Dynamic Range Images"
# Fairchild, M. D., Johnson, G.M.: ‘The iCAM framework for image appearance, differences and quality’. J Electron. Imaging, 2004 # Xiao, J., Li, W., Liu, G., Shaw, S., & Zhang, Y. (n.d.). Hierarchical tone mapping based on image color appearance model

# Mantiuk, R., Daly, S., & Kerofsky, L. (n.d.). Display Adaptive Tone Mapping. http://resources.mpi-inf.mpg.de/hdr/datmo/mantiuk08datm.pdf # https://web.archive.org/web/20150206044300/http://docs.opencv.org/trunk/doc/tutorials/photo/hdr_imaging/hdr_imaging.html # Durand and Julie Dorsey, “Fast Bilateral Filtering for the Display of High-Dynamic-Range Images”. ACM Transactions on Graphics, 2002, 21, 3, 257 - 266. https://people.csail.mit.edu/fredo/PUBLI/Siggraph2002/DurandBilateral.pdf


External links

{{commons category, Tone-mapped HDR images
CVLTonemap: GPU accelerated tone mapping

HDR Darkroom

pfstmo: implementation of tone mapping operators

exrtools: a collection of utilities for manipulating OpenEXR images
(includes some tone mapping operators)
pfstools
is an open-source set of command line programs for reading, writing and manipulating high-dynamic range (HDR) images and video frames
Luminance HDR/QtPfsGui
is a free (open-source) HDR-workflow software for Linux, Windows and Mac OS X based around the pfstools package
LDR tonemapping
is a free (open-source) tonemapper for low dynamic range images (a.k.a. "pseudo-HDR")
Atlas
is a free (open-source) port of the pfstmo tone mapping operators to
Adobe After Effects Adobe After Effects is a digital visual effects, motion graphics, and compositing application developed by Adobe Inc., and used in the post-production process of film making, video games and television production. Among other things, After Eff ...

Flickr HDR pool
a collection of surreal tone mappings
UC Berkeley paper with raw data for Purkinje effect

Stuck in Customs
an extensive tutorial to make HDR images


Tone mapping algorithms


Perceptually Based Tone Mapping for Low-Light Conditions

Photographic Tone Reproduction for Digital Images

Lightness Perception in Tone Reproduction for High Dynamic Range Images

Contrast Processing of High Dynamic Range Images

Fast Bilateral Filtering for the Display of High-Dynamic-Range Images

A Fast Approximation of the Bilateral Filter using a Signal Processing Approach

Gradient Domain High Dynamic Range Compression
Computer graphics Articles with example C++ code High-dynamic-range imaging