“Gamma” and Its Disguises: the Nonlinear Mappings of Intensity in Perception, Crts, Film and Video
Total Page:16
File Type:pdf, Size:1020Kb
“Gamma” and its Disguises: The Nonlinear Mappings of Intensity in Perception, CRTs, Film and Video By Charles A. Poynton In photography, video and computer graphics, the gamma symbol γ represents a Luminance numerical parameter that describes the nonlinearity of intensity reproduction. The subject of colorimetry concerns the Gamma is a mysterious and confusing subject, because it involves concepts from four relationship between the sensation of disciplines: physics, perception, photography and video. In this note I will explain color and spectral power at different how gamma is related to each of these disciplines. Having a good understanding of wavelengths in the visible band. De- the theory and practice of gamma will enable you to get good results when you create, tailed discussion of colorimetry is be- process and display pictures. yond the scope of this note, except for one fact that is important here. Human This note focuses on electronic reproduction of images, using video and computer vision gives special treatment to lumi- graphics techniques and equipment. However, the discussions of perception and nance, or roughly speaking, brightness. photography may be of general interest as well. This note deals mainly with the Luminance is a weighted mixture of reproduction of intensity, or as a photographer would say, tone scale. This is one spectral energy, where the weights are important step to achieving good color reproduction, but issues specific to color are determined by the characteristics of covered elsewhere. human vision. Luminance comprises roughly 11% power from blue regions of the spectrum, 59% from green and The nonuniform perception of intensity of the channel, and simultaneously cor- 30% from red. The coefficients in this is the subject of the first section of this rects for intensity nonlinearity at the weighted sum are derived from the sen- note. The human perceptual response to CRT display. If gamma correction were sitivity of human vision to the corre- intensity is distinctly nonuniform: the not already necessary for physical rea- sponding wavelengths: a saturated blue lightness sensation of vision is roughly sons at the CRT, we would have to color is quite dark, having a brightness a power function of intensity. This char- invent it for perceptual reasons. of about 0.11 relative to white. A satu- acteristic of vision needs to be accom- The next section of this note switches to rated red is considerably lighter, and modated if an image is to be coded so as a completely different topic: photogra- saturated green is lighter still. to minimize the visibility of noise and phy. Photography also involves make effective perceptual use of a lim- The Commission Internationale de ited number of bits per pixel. nonlinearity of intensity reproduction. L’Éclairage (CIE, or International Com- The nonlinearity of film is character- mission on Illumination) is the interna- The origin of gamma in the physics of a ized by a parameter gamma. As you tional body responsible for standards in cathode-ray tube (CRT) is covered in might suspect, electronics inherited the the area of color perception. The CIE the second section of this note. The term from photography! The effect of has standardized a weighting function, CRTs that are ubiquitous in workstation gamma in film primarily concerns the defined numerically, that relates spec- displays and in television sets are inher- appearance of pictures rather than the tral power to luminance. The symbol for ently nonlinear devices: the intensity of accurate reproduction of intensity val- luminance is Y, sometimes emphasized light reproduced at the screen of a CRT ues. Some of the appearance aspects of as being standard by the prefix CIE. monitor is not proportional to its voltage gamma in film also apply to television input. From a strictly physical point of and computer displays. Unfortunately, in video practice, the view, gamma correction can be thought term luminance has come to mean the In the fifth section of this note I will of as the process of compensating for video signal representative of luminance this nonlinearity in order to achieve describe how video draws aspects of its even though that video signal has been handling of gamma from of all of these correct reproduction of intensity. subjected to a nonlinear transfer func- areas: knowledge of the CRT from phys- tion. In the early days of video, the The third section of this note discusses ics, knowledge of the nonuniformity of nonlinear signal was denoted Y’, where how combining these two concepts — vision from perception, and knowledge the prime symbol indicated the nonlin- one from perception , the other from of viewing conditions from photogra- ear treatment. But over the last forty physics— reveals an amazing coinci- phy. I will also discuss additional de- years the prime has been elided in video dence: the nonlinearity of a CRT is tails of the CRT transfer function that usage and now both the term luminance remarkably similar to the inverse of the you will need to know if you wish to and the symbol Y collide with the CIE, lightness sensitivity of human vision. calibrate a CRT or determine its making both ambiguous! This has led to Coding intensity into a gamma-corrected nonlinearity. great confusion, such as the incorrect signal makes maximum perceptual use In the final section of this note I will statement commonly found in computer make some comments about gamma graphics and color textbooks that in the Charles A. Poynton is a Staff Engineer with Sun correction in computer graphics. YIQ or YUV color spaces, the Y com- Microsystems Computer Corp., Mountain View, CA ponent is CIE luminance. I use the term 94043. Copyright © 1993 Society of Motion Picture and luminance according to its standardized Television Engineers, Inc. All rights reserved. SMPTE Journal, December 1993 1099 CIE definition and use the term luma to refer to the video signal. But my con- vention is not yet widespread, and in the meantime you must be careful to deter- mine whether a linear or nonlinear inter- pretation is being applied to the word and the symbol. Until now I have used the familiar term +∆ intensity — including in the title of this LL L note! — but from now on I will use the technical term luminance to refer to the brightness response of human vision. I will continue to use intensity for linear- light red, green and blue quantities. Luminance is a linear-light quantity, although its spectral composition is de- L0 fined according to human vision. The response of human visual system to luminance is the subject of the next L0: Adaptation (surround) Luminance section. Perception L: Test Luminance Human vision adapts over a remarkably ∆ L: Minimum detectable difference wide range of intensity levels — about seven decades of dynamic range in to- tal. This is illustrated in the sketch be- low. For about two decades at the bot- The adaptation is controlled by total the luminance of blacks, and thereby tom end of the intensity range, the reti- retinal illumination. Dark adaptation to lessen the contrast ratio and impair per- nal photoreceptor cells called rods are a lower intensity is slow: it can take ceived picture quality. employed. Since there is only one type many minutes to adapt from a bright of rod cell, what is loosely called night sunlit day to the dark ambient light of a Within the two decade range of lumi- nance over which vision can distinguish vision cannot discern colors. About one cinema. Light adaptation towards higher luminance levels, human vision has a decade of adaptation is effected by the intensity is more rapid but can be pain- certain discrimination threshold. For a iris; the remainder of the adaptation is ful, as you may have experienced when reason that will become clear in a mo- due to a photochemical process that walking out of the cinema back into ment, it is convenient to express the involves the visual pigment substance daylight. Since adaptation is controlled contained in photoreceptor cells. by total retinal illumination, your adap- discrimination capability in terms of contrast sensitivity, which is the ratio of tation state is closely related to the in- luminances between two adjacent tensity of “white” in your field of view. patches of similar luminance. Absolute At a particular state of adaptation, hu- The diagram above shows the pattern Scene man vision can distinguish different lu- presented to an observer in an experi- Luminance minance levels down to about one per- cent of peak white. In other words, our ment to determine the contrast sensitiv- ity of human vision. Most of the ability to distinguish luminance differ- observer’s field of vision is filled by a 10 k ences extends over a luminance range of surround luminance level L , in order about 100:1. Loosely speaking, intensi- 0 to fix the observer’s state of adaptation. 1 k ties less than about one percent of what In the central area of the field of vision sunlight is sometimes called peak white appear 100 simply “black”: different luminance is placed two adjacent patches having slightly different luminance levels L 100 values below this luminance level can- ∆ 10 and L+ L. The experimenter presents twilight not be distinguished. 10 stimuli having a wide range of test val- Contrast ratio is defined as the ratio of ues with respect to the surround, that is, 1 1 luminance between the lightest and dark- L est elements of a scene. Contrast ratio is a wide range of values. At each test moonlight L 100 m a major determinant of perceived pic- 0 ture quality, so much so that an image luminance, the experimenter presents to 10 m reproduced with a high contrast ratio the observer a range of luminance incre- may be judged sharper than another ments with respect to the test stimulus, starlight 1 m image that has higher measured spatial LL+ ∆ resolution.