Gamma correction

The gamma correction is a correction function frequently used especially in the field of image processing for converting a physically proportional (ie linear) growing in a size according to human perception is not linear growing size. Mathematically, it is in this function is a power function with a gamma often only briefly mentioned exponent as the only parameter.

  • 6.1 gamma correction for the linearization
  • 6.2 details

Introduction

The gamma correction transferred to an input Iin according to a mapping rule to an output variable Iout:

The following applies:

And

Depending on the size of the real-valued parameter γ ( gamma) differentiates three cases:

  • γ = 1: Iout = Iin, the mapping is linear.
  • γ <1: The picture is concave. Small input values ​​are strongly spread, large compressed.
  • γ > 1: The figure is convex. Small input values ​​are compressed, large spread.

In the graphic, three sample curves are drawn for γ = 3, 0.3, and 1

Sometimes the inverse value of the parameter is referred to as the Gamma γ → 1 / γ

History

The text of the standard of DIN EN 61966-2 Annex A ( color measurement and color management ) makes reference to the initial use of the term gamma correction in photography by Ferdinand Hurter and Vero Charles Driffield since the 1890s. In photography, it is sometimes used synonymously for increase, gradient and contrast. Definitions for screen display are from Irving Langmuir in the 1910s and by Oliver in the 1940s.

A distinction must also " electron guns " gamma values ​​of " fluorescent " gamma values. Therefore, the DIN EN standard 61966 -A speaks of " ambiguity in the definition of the term ' gamma ' " and recommends not to use the term in normative contexts.

Perception and gamma correction

The perceived by humans increases brightness in dark areas steeper and bright less steeply. Stevens's potency, the function assigns the human eye, while a gamma of about 0.3 to 0.5. If the brightness signal of a linearly operating display device, such as a monitor, are perceived linearly, it must therefore be pre-emphasized ( approximately 3.3 to 2) with the reciprocal of the above gamma value, so that both nonlinearities cancel back to the viewer at the end. A typical value for such screens is a gamma of 2.2.

Example Monitors

The mean original image shows a greyscale wedge and three step wedges in the saturated colors of red, green and blue, each with 32 fields with linearly increasing brightness. The left image shows the image after gamma correction with the exponent and the right image according to a gamma correction to the exponent. The brightness of the darkest and lightest areas are always retained. The respective 17 field from the left has in the original image () a brightness of 50 %, in the left image () a brightness of and in the right image has a brightness of.

Windows

The gamma value of an average -operated with Windows monitor is 2.2. This setting is recommended because photographic laboratories also work with a gamma of 2.2, and so is exposed accordingly to the monitor for good befundenes image. You can set the gamma indirectly by specifying an output color profile. Here offers the use of sRGB profile for the "normal" users, which is a gamma of 2.2 is based.

Mac OS

The same monitor on a Mac was by default operated until recently with a gamma of 1.8. The reasons stem nor the time before the ICC color management. A gamma of 1.8 was intended for a workflow without color management, so that the monitor display better corresponded to the tone reproduction of black and white printers. Nowadays, the gamma values ​​are supplemented by color profiles (for example, from the ICC ); the standard Mac color profile in this case contains a gamma of 1.8. Starting with Mac OS X 10.6 (Snow Leopard) the default gamma value is 2.2.

Gamma - test graphics

Method

To determine the approximate gamma value of a monitor, use a graphic that is printed with a 50 % covered black dots pattern ( a checkerboard pattern, but finer resolved) and compares it with a gray box (brightness value 50%). Both surfaces must then - considered slightly out of focus - the same "gray" appear.

If you have so found out the actual gamma value of his monitor, you can adjust using the graphics settings on his computer a separate, independent from the factory default value. By adjusting the graphics settings to the reciprocal of the value found as gamma, the gamma correction for the monitor (in theory) is neutralized; it results in an actual gamma value of 1 If you want to get an actual gamma value of 2.2, for example, so you have to multiply by the reciprocal of 2.2 and set this value as the gamma value. If you have found an actual gamma value of 1.3, for example, so you have to adjust the graphics settings the value 0.77, to neutralize the gamma correction, and 1.69 to the actual gamma of 2.2 to achieve.

Example image processing

Tonal adjustments like changes in brightness, contrast, etc. convert color values ​​of an image into different color values ​​of the same color space. Is the correction function while a power function of the form A = E, is called a gamma correction. In gross simplification lifts < to 1 to dark areas of the image in its brightness, while when using gamma values> such a correction when using gamma values ​​1 - takes back again in their brightness to bright picture areas - vice versa. When a gamma = 1 finally remains as E1 = E, everything is the same.

To be considered, however, that some image editing programs like GIMP does not count in the gamma correction with the gamma value itself, but by the reciprocal of 1/Gamma, so the results are exactly the opposite then.

Image selectively brightened with = 0.3

Image selectively darkened with = 3

If the correction function multiplied by a coefficient ( = A * E), this results in addition to the actual gamma correction or contrast enhancement () or minimization () when adding an additive constant contrast (A = E ) of the gamma correction, a brightness increase () or minimization (). In practice, thus cause alone the two additional options just mentioned quickly to a bewildering array of correction options - the above figure on the right shows, therefore, again separately the respective characteristic of the brightness, contrast and gamma correction.

As digital video technology

Consider first an imaging system with ideal - linear behavior:

As far as the simplest example of a closed system, which is based on and disregards all information technology requirements. In reality, we have but to do it with open systems and want to edit the data on the camera to the computer, they spend on the different output media and always see the same result.

Since there is no ideal linear systems must be added in this process, two (or six ) gamma corrections. First, the chip has a non-linear behavior for the three color channels of various kinds This must be compensated by an additional gamma correction respectively. Secondly, the three phosphors of the screen behave nonlinearly. The color corrections are device- related and are usually implemented as early as the devices themselves. Only the age of the device can deteriorate the result of this correction. The user gets from these corrections usually with nothing. If the correction date, usually results in a tilting color ( a color cast different colors and intensity over the course of a gray wedge ).

Each imaging system has to deal with the problem of the perception of brightness. Thus, a wealth of gamma corrections arose. The color television systems PAL and NTSC, the operating systems Microsoft Windows and Mac OS and Unix-like systems, but also printer manufacturers know the problem (see also dot gain ).

Gamma correction for the linearization

RGB monitors and TV sets have different brightness profiles and often require a correction to optimally display the image.

Ideally, an output device, would the brightness value 0 show as black and the brightness value of 1 as white and display all intermediate values ​​linearly between black and white as different gray values. This corresponds to a gamma of 1

Due to production- related factors such linearity with recording devices (eg, cameras) or output devices (eg, picture tubes ) can not be reached. Usually, the non-linear input characteristic of an image converter passes (for example, an LCD ) or a CCD camera chip, the decisive role. This means that on an image with constant brightness change from black to white in a gamma different from 1 either the bright and dark areas are represented disproportionately in detail or else the middle grayscale.

To go no brightness information is lost in the further production path or be represented overemphasized, has any device that has a non- linear transfer function, the possibility of a gamma correction for linearization of the imaging performance.

Own, so there may be due to different sensitivities gamma correction for each color channel can be necessary a device has several imager for different colors, such as a three- tube camera.

The gamma correction is known in the digital image processing as a power transformation.

Details

The connection between the digital and the radiometric data is referred to in the literature as the cathode -ray tube transfer function (gamma ). For better clarity, we will post those overall function, split into two parts, the digital part D ( graphics card) and the analog part A ( monitor input, screen).

The relationship between the input voltage and monitor the resulting brightness ( luminance ) of each pixel, so our function A, follows a generally exponential function. In the simplest model is:

With: normalized to 1 and input voltage: normalized to 1 brightness.

This is based on the behavior of the accelerated electrons in the picture tube, the main effect is due to the shielding effect of the electron cloud surrounding the cathode. This simple model is extended by the addition of constants represent the various display parameters. The optimum would be a linear relationship with zero point at zero, maximum output at maximum input signal and a linear relationship, ie.

The luminance dependence of color phosphors with respect to the current strength is also describable by a power function whose exponent is about 0.9. From this a total exponent yields to 1.6 ( TV ) 1.8 ( Mac systems ) to 2.2 (IBM - PC compatible systems ) for computer monitors.

The resulting dependence can be described by:

With the parameters

Origin

The concept of scale was first introduced in the Sensitometry, ie to describe the sensitivity of photographic material, which are in addition to the gamma value and various other photographic material characterizing parameters in this regard.

For the determination of the gamma value, of a photographic material, such as Black and white film or photo paper, you investigated using a density or tone curve (see example image ), the steepness of its optical density, ie Darkness in response to exposure and defined here as gamma ( ) is the slope of a tangent to the linear part of this curve. Since the blackening of photographic material logarithmically increases with the exposure, even her logarithm has to be used in the mathematical formulation of this relationship instead of the exposure:

.

Based on the thus determined gamma value, you can then eg Distinguish photographic papers according to their gradation in " hard" and " soft", ie such that the "normal" response to an increase in the exposure sensitive than, or less sensitive. Mistakenly of this observed gamma often also used to describe linear tonal adjustments (see above) is used, although it is rather a measure of the contrast of the image in this context.

Histogram for a "soft" linear Levels

Simulation of " hard" photo paper with linear = 4

Histogram for a "hard" linear Levels

Swell

360475
de