High Dynamic Range Imaging
Total Page:16
File Type:pdf, Size:1020Kb
High Dynamic Range Imaging Greg Ward Exponent – Failure Analysis Assoc. Menlo Park, California Abstract range and color gamut are already widespread, and laser raster projectors are on the horizon. It is an important question The ultimate in color reproduction is a display that can whether we will be able to take full advantage and adapt our produce arbitrary spectral content over a 300-800 nm range color models to these new devices, or will we be limited as with 1 arc-minute resolution in a full spherical hologram. we are now to remapping sRGB to the new gamuts we have Although such displays will not be available until next year, available -- or worse, getting the colors wrong? Unless we we already have the means to calculate this information introduce new color models to our image sources and do it using physically-based rendering. We would therefore like soon, we will never get out of the CRT color cube. to know: how may we represent the results of our The simplest solution to the gamut problem is to calculation in a device-independent way, and how do we map adhere to a floating-point color space. As long as we permit this information onto the displays we currently own? In values greater than one and less than zero, any set of color this paper, we give an example of how to calculate full primaries may be linearly transformed into any other set of spectral radiance at a point and convert it to a reasonably color primaries without loss. The principal disadvantage of correct display color. We contrast this with the way most floating-point representations is that they take up too computer graphics is usually done, and show where much space (96-bits/pixel as opposed to 24). Although this reproduction errors creep in. We then go on to explain may be the best representation for color computations, reasonable short-cuts that save time and storage space storing this information to disk or transferring it over the without sacrificing accuracy, such as illuminant discounting internet is a problem. Fortunately, there are representations and human gamut color encodings. Finally, we demonstrate based on human perception that are compact and sufficiently a simple and efficient tone-mapping technique that matches accurate to reproduce any visible color in 32-bits/pixel or display visibility to the original scene. less, and we will discuss some of these in this paper. There are two principal methods for generating high Introduction dynamic-range source imagery: physically-based rendering (e.g., [2]), and multiple-exposure image capture (e.g., [3]). Most computer graphics software works in a 24-bit RGB In this paper, we will focus on the first method, since it is space, with 8-bits allotted to each of the three primaries in a most familiar to the author. It is our hope that in the power-law encoding. The advantage of this representation is future, camera manufacturers will build HDR imaging that no tone-mapping is required to obtain a reasonable principles and techniques into their cameras, but for now, reproduction on most commercial CRT display monitors, the easiest path to full gamut imagery seems to be computer especially if both the monitor and the software adhere to the graphics rendering. sRGB standard, i.e., CCIR-709 primaries and a 2.2 gamma Computer graphics lifts the usual constraints associated [1]. The disadvantage of this practice is that colors outside with physical measurements, making floating-point color the sRGB gamut cannot be represented, particularly values the most natural medium in which to work. If a renderer is that are either too dark or too bright, since the useful physically-based, it will compute color values that dynamic range is only about 90:1, less than 2 orders of correspond to spectral radiance at each point in the rendered magnitude. By contrast, human observers can readily image. These values may later be converted to displayable perceive detail in scenes that span 4-5 orders of magnitude in colors, and the how and wherefore of this tone-mapping luminance through local adaptation, and can adapt in operation is the main topic of this paper. Before we get to minutes to over 9 orders of magnitude. Furthermore, the tone-mapping, however, we must go over some of the sRGB gamut only covers about half the perceivable colors, details of physically-based rendering, and what qualifies a missing large regions of blue-greens and violets, among renderer in this category. Specifically, we will detail the others. Therefore, although 24-bit RGB does a reasonable basic lighting calculation, and compare this to common job of representing what a CRT monitor can display, it does practice in computer graphics rendering. We highlight some a poor job representing what a human observer can see. common assumptions and approximations, and describe Display technology is evolving rapidly. Flat-screen alternatives when these assumptions fail. Finally, we LCD displays are starting to replace CRT monitors in many demonstrate color and tone mapping methods for converting offices, and LED displays are just a few years off. the computed spectral radiance value to a displayable color at Micromirror projection systems with their superior dynamic each pixel. The Spectral Rendering Equation Participating Media Implicitly missing from Eq. (1) is the interaction of light with the atmosphere, or participating media. If the space R ( , ) = f ( ; , )R ( , )cos d (1) between surfaces contains significant amounts of dust, o o òò r o i i i i i smoke, or condensation, a photon leaving one surface may The spectral rendering Eq. (1) expresses outgoing spectral be scattered or absorbed along the way. An additional radiance R o at a point on a surface in the direction o ( o, o) equation is therefore needed to describe this volumetric as a convolution of the bidirectional reflectance distribution effect, since the rendering equation only addresses function (BRDF) with the incoming spectral radiance over interactions at surfaces. the projected hemisphere. This equation is the basis of dR(s) many physically-based rendering programs, and it already =- R(s)- R(s) + contains a number of assumptions: ds a s 1. Light is reflected at the same wavelength at which it is received; i.e., the surface is not s òRi( i)P( i)d fluorescent. 4 (2) 2. Light is reflected at the same position at which it is received; i.e., there is no subsurface scattering. Eq. (2) gives the differential change in radiance as a function 3. Surface transmission is zero. of distance along a path. The coefficients s a and s s give the 4. There are no polarization effects. absorption and scattering densities respectively at position s, 5. There is no diffraction. which correspond to the probabilities that light will be 6. The surface does not spontaneously emit light. absorbed or scattered per unit of distance traveled. The In general, these assumptions are often wrong. Starting scattering phase function, P( i), gives the relative with the first assumption, many modern materials such as probability that a ray will be scattered in from direction i at fabrics, paints, and even detergents, contain “whitening this position. All of these functions and coefficients are agents” which are essentially phosphors added to absorb also a function of wavelength. ultraviolet rays and re-emit them at visible wavelengths. The above differential-integral equation is usually solved The second assumption is violated by many natural and numerically by stepping through each position along the man-made surfaces, such as marble, skin, and vinyl. The path, starting with the radiance leaving a surface given by third assumption works for opaque surfaces, but fails for Eq. (1). Recursive iteration from a sphere of scattered transparent and thin, translucent objects. The fourth directions can quickly overwhelm such a calculation, assumption fails for any surface with a specular (shiny) especially if it is extended to multiple scattering events. component, and becomes particularly troublesome when Without going into details, Rushmeier et al. approached the skylight (which is strongly polarized) or multiple reflections problem of globally participating media using a zonal are involved. The fifth assumption fails when surface approach akin to radiosity that divides the scene into a finite features are on the order of the wavelength of visible light, set of voxels whose interactions are characterized in a form- and the sixth assumption is violated for light sources. factor matrix [8]. More recently, a modified ray-tracing Each of these assumptions may be addressed and method called the photon map has been applied successfully remedied as necessary. Since a more general rendering to this problem by Wann Jensen et al. [9]. In this method, equation would require a long and tedious explanation, we photons are tracked as they scatter and are stored in the merely describe what to add to account for the effects listed. environment for later resampling during rendering . To handle fluorescence, the outgoing radiance at wavelength l o may be computed from an integral of incoming radiance Solving the Rendering Equation over all wavelengths l I, which may be discretized in a Eq. (1) is a Fredholm integral equation of the second kind, matrix form [4]. To handle subsurface scattering, we can which comes close to the appropriate level of intimidation integrate over the surface as well as incoming directions, or but fails to explain why it is so difficult to solve in general use an approximation [5]. To handle transmission, we [10]. Essentially, the equation defines outgoing radiance as simply integrate over the sphere instead of the hemisphere, an integral of incoming radiance at a surface point, and that and take the absolute value of the cosine for the projected incoming radiance is in turn defined by the same integral area [2].