Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
литература / Digital_Video_and_HD_Second_Edition_Algorithms_and_Interfaces.pdf
Скачиваний:
0
Добавлен:
13.05.2026
Размер:
38.02 Mб
Скачать

Gamma

27

Luminance is proportional to intensity. For an introduction to the terms brightness, intensity, luminance, and lightness, see page 27. Further detail on luminance and lightness is found on page 255.

Electro-optical conversion function

(EOCF) refers to the function that characterizes conversion from the electrical signal domain into light, through some combination of signal processing and intrinsic display physics.

In photography, video, and computer graphics, the gamma symbol (γ) represents a numerical parameter that estimates, in a single numerical parameter, the exponent of the assumed power function that maps from code (pixel) value to tristimulus value. Gamma is a mysterious and confusing subject, because it involves concepts from four disciplines: physics, perception, photography, and video. This chapter explains how gamma is related to each of these disciplines. Having a good understanding of the theory and practice of gamma will enable you to get good results when you create, process, and display pictures.

This chapter concerns the electronic display of images using video and computer graphics techniques and equipment. I deal mainly with the presentation of luminance, or, as a photographer would say, tone scale. Achieving good tone reproduction is one important step toward achieving good colour reproduction. (Other issues specific to colour reproduction were presented in the previous chapter, Colour science for video.)

A cathode-ray tube (CRT) is inherently nonlinear: The luminance produced at the face of the display is a nonlinear function of each (R’, G’, and B’) voltage input.

From a strictly physical point of view, gamma correction at the camera can be thought of as precompensation for this nonlinearity in order to achieve correct reproduction of relative luminance.

Perceptual uniformity was introduced on page 8: Human perceptual response to luminance is quite nonuniform: The lightness sensation of vision is roughly the 0.42-power function of relative luminance. This

315

Opto-electronic conversion function (OECF) refers to the transfer function in a scanner or camera that relates light power to signal code. In video, it’s sometimes termed opto-electronic transfer function, OETF.

Olson, Thor (1995), “Behind gamma's disguise,” in SMPTE Journal, 104 (7): 452–458 (July).

nonlinearity needs to be considered if an image is to be coded to minimize the visibility of noise so as to make best perceptual use of a limited number of bits per pixel. Combining the CRT nonlinearity (from physics), and

lightness sensitivity (from perception) reveals an amazing coincidence: The nonlinearity of a CRT is remarkably similar to the inverse of the lightness sensitivity of human vision. Coding tristimulus value RGB into a gamma-corrected signal R’G’B’ makes maximum perceptual use of each signal component. If gamma correction had not already been necessary for physical reasons at the CRT, we would have had to invent it for perceptual reasons. Modern displays such as LCDs and PDPs don’t have CRT physics, but the CRT’s nonlinearity has been replicated through signal processing.

I will describe how video draws aspects of its handling of gamma from all of these areas: knowledge of the CRT from physics, knowledge of the nonuniformity of vision from perception, and knowledge of viewing conditions from photography.

Gamma in CRT physics

The electron gun of a CRT involves a theoretical relationship between voltage input and light output that a physicist calls a five-halves power law: Luminance produced at the face of the screen is in principle proportional to voltage input raised to the 52 power. Luminance is roughly between the square and cube of the voltage. The numerical value of the exponent of this power function is represented by the Greek letter γ (gamma). CRT displays historically had behaviour that reasonably closely approximated this power function: Studio reference display CRTs have a numerical value of gamma quite close to 2.4.

Figure 27.1 opposite is a sketch of the power function that applies to the electron gun of a greyscale CRT, or to each of the red, green, and blue electron guns of a colour CRT. The three channels exhibit very similar, but not necessarily perfectly identical, responses.

The nonlinear voltage-to-luminance function of a CRT originates with the electrostatic interaction

between the cathode, the grid, and the electron beam. The function is influenced to some extent by the mechanical structure of the electron gun. Contrary to

316

DIGITAL VIDEO AND HD ALGORITHMS AND INTERFACES

 

120

 

 

 

 

 

 

]

 

 

 

 

 

 

 

-2

100

 

 

 

 

 

 

L [cd·m

 

 

 

 

 

 

80

 

 

 

 

 

 

Luminance,

60

 

 

 

 

 

 

40

 

 

 

 

 

 

 

20

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

0

0.2

0.4

0.6

0.8

1.0

1.2

R’G’B’ signal, V (normalized)

Figure 27.1 Display electro-optical function (EOCF) involves a nonlinear relationship between video signal and luminance, graphed here at gain settings of 0.9, 1.0, and 1.1 (effected by the poorly-named contrast control). Luminance is approximately proportional to input signal voltage raised to the 2.4 power. The gamma of a display system – historically, that of a CRT – is the exponent of the assumed power function. Here the contrast control is shown varying the gain of the video signal (on the x-axis), the way it’s usually implemented; however, owing to the mathematical properties of a power function, scaling the luminance output would yield the same effect.

Roberts, Alan (1993), “Measurement of display transfer characteristic (gamma, γ),” in EBU Technical Review 257: 32–40 (Autumn).

In Mac OS X operating system version 10.6 (“Snow Leopard”), released in 2009, Apple adopted a default gamma of 2.2: R’G’B’ values presented to the graphics subsystem are now interpreted as sRGB by default.

popular opinion, CRT phosphors themselves are quite linear, at least up to about eight-tenths of peak luminance. I denote the exponent the decoding gamma, γD. The value of decoding gamma (γ D) for a typical, properly adjusted CRT in a studio environment ranges from about 2.3 to 2.4. Computer graphics practitioners

sometimes claim numerical values of gamma wildly different from 2.4; however, such measurements often disregard two issues. First, the largest source of variation in the nonlinearity of a display is careless setting of the brightness (or black level) control. Before a sensible measurement of gamma can be made, this control must be adjusted, as outlined on page 56, so that black-valued pixels are correctly displayed. Second, computer systems often have lookup tables (LUTs) that effect control over transfer functions. A gamma value dramatically different from 2.4 is often due to the function loaded into the LUT. For example, Macintosh computers prior to 2009 were said to have a gamma of 1.8; however, that value was a consequence of the default Macintosh LUT, not the Macintosh display itself (which has gamma between about 2.2 and 2.4).

CHAPTER 27

GAMMA

317

Many video engineers are unfamiliar with colour science. They consider only the first of these two purposes, and disregard, or remain ignorant of, the great importance of perceptually uniform coding.

Understanding CRT physics is an important first step toward understanding gamma, but it isn’t the whole story.

The amazing coincidence!

In Luminance and lightness, on page 255, I described the nonlinear relationship between luminance (a physical quantity) and lightness (a perceptual quantity): Lightness is approximately luminance raised to the 0.42-power. The previous section described how the nonlinear transfer function of a CRT relates a voltage signal to luminance. Here’s the surprising coincidence:

A CRT’s signal-to-luminance function is very nearly the inverse of the luminance-to-lightness relationship of human vision.

In analog systems, we represent lightness information as a voltage, to be transformed into luminance by a CRT’s power function. Digital systems simply digitize analog voltage. To minimize the perceptibility of noise, we use a perceptually uniform code. Amazingly, the CRT function is a near-perfect inverse of vision’s lightness sensitivity: CRT voltage is effectively a perceptually uniform code! In displays such as LCDs and PDPs, we impose signal processing to mimic CRT behaviour.

Gamma in video

In a video system, “gamma correction” is applied at the camera for the dual purposes of precompensating the nonlinearity of the display’s CRT and coding into perceptually uniform space. Figure 27.2 summarizes the image reproduction situation for video. At the left, gamma correction is imposed at the camera; at the right, the display imposes the inverse function.

Coding into a perceptual domain was important in the early days of television because of the need to minimize the noise introduced by over-the-air analog transmission; the same considerations of noise visibility applied to analog videotape recording. These considerations also apply to the quantization error that is introduced upon digitization, when a linear-light signal is quantized to a limited number of bits. Consequently, it is universal to convey video signals in gamma-corrected form.

318

DIGITAL VIDEO AND HD ALGORITHMS AND INTERFACES

Figure 27.2 Image reproduction in video.

Relative luminance from the scene is presented

at the display. We do not seek to reproduce the abso-

lute luminance level of the scene, so a suitable scale factor is used. However, the ability of vision to detect that two luminance

levels differ is not uniform from black to white, but is approximately a

constant ratio – about 1.01 – of the luminance. In video, luminance from the scene

is transformed by a function similar to a square root into a nonlinear, perceptually uniform signal that is transmitted. The camera is designed to mimic the human visual system, in order to “see” lightness in the scene the same way that a human observer would. Noise introduced by the transmission system then has minimum perceptual impact. The nonlinear signal is transformed back to luminance at the display. In a CRT, a 2.4-power function is intrinsic; in other display technologies, a comparable power function is included in the signal processing.

Gamma correction is ordinarily based upon a power function, which has the form y = xa (where a is constant). Gamma correction is sometimes incorrectly claimed to be an exponential function, which has the form y = ax (where a is constant).

Gamma correction is unrelated to the gamma function Γ(·) of mathematics.

The importance of picture rendering, and the consequent requirement for different exponents for encoding (γE) and decoding (γD), have been poorly recognized and poorly documented in the development of video.

In a video camera, we precompensate for the CRT’s nonlinearity by processing each of the R, G, and B tristimulus signals through a nonlinear transfer function. This process is known as gamma correction. The function required is approximately a square root. The curve is often not precisely a power function; nonetheless,

I denote the best-fit exponent the encoding gamma, γE. In video, gamma correction is accomplished by analog (or sometimes digital) circuits at the camera. In computer graphics, gamma correction is usually accomplished by incorporating the nonlinear transfer function into a framebuffer’s lookup table.

As explained in Picture rendering, on page 115, it is important for perceptual reasons to alter the tone scale of an image presented at a luminance substantially lower than that of the original scene, presented with limited contrast ratio, or viewed in a dim surround. The dim surround condition is characteristic of television viewing. In video, the alteration is accomplished at the camera by slightly undercompensating the actual power function of the CRT, to obtain an end-to-end power

CHAPTER 27

GAMMA

319

Соседние файлы в папке литература