Information about Gamma Correction

Enlarge picture
Plot of the sRGB standard gamma-expansion nonlinearity (red), and its local gamma value, slope in log–log space (blue). Below a compressed value of 0.04045 or a linear intensity of 0.00313, the curve is linear so the gamma is 1. The dashed black curve behind the red curve is a standard gamma = 2.2 power-law curve.


Gamma correction, gamma nonlinearity, gamma encoding, or often simply gamma, is the name of a nonlinear operation used to code 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:



where the input and output values are non-negative real values, typically in a predetermined range such as 0 to 1. The case is often called gamma compression and is called gamma expansion.

Explanation

Gamma compression, also known as gamma encoding, is used to encode linear luminance or RGB values into video signals or digital file values; gamma expansion is the inverse, or decoding, process, and occurs largely in the nonlinearity of the electron-gun current–voltage curve in CRT monitor systems. Gamma encoding helps to map data into a more perceptually uniform domain, so as to optimize perceptual performance of a limited signal range, such as a limited number of bits in each RGB component.

A gamma value is sometimes used to quantify contrast, for example of photographic film. It is the slope of an input–output curve in log–log space, that is:



which is consistent with the power-law relation above, but applicable to more general nonlinearities. In the case of film, such nonlinearities are called Hurter–Driffield curves, where gamma values less than 1 are typical of negative film, and values greater than 1 are typical of slide (reversal) film.

Windows, Mac, and sRGB standard gammas

In Windows video, images are encoded with a gamma of about 0.45 and decoded with a gamma of 2.2; in Macintosh systems, the corresponding typical values are 0.55 and 1.8.

The sRGB color space standard used with most cameras, PCs, and printers does not use a simple power-law nonlinearity as above, but has a decoding gamma value near 2.2 over much of its range, as shown in the plot to the right.

CRT-based television receivers do not usually need gamma correction, since the standard video signals that are transmitted incorporate gamma compression that matches the gamma expansion of the receiver's CRT.

Simple monitor tests

Enlarge picture
Monitor gamma test
To see whether your computer monitor is properly hardware adjusted and can display shadow detail in standard sRGB images properly, you should see the left half of the circle in the large black square very faintly (or not at all), but the right half should be clearly visible. If not, you can adjust your monitor's contrast and/or brightness setting. This alters the monitor's perceived gamma.

This procedure is not suitable for calibrating or print-proofing a monitor. It can be useful for making your monitor display sRGB images approximately correctly, on systems in which profiles are not used (for example, the Firefox browser and many others) or in systems that assume untagged source images are in the sRGB colorspace.

On some operating systems running the X Window System you can change gamma-correction settings, by issuing the command xgamma -gamma 2.1 for setting gamma value to 2.1, and xgamma for querying current value.



In the test pattern to the right, the linear intensity of each solid bar is the average of the linear intensities in the surrounding striped dither; therefore, ideally, the solid squares and the dithers should appear equally bright in a properly adjusted sRGB system.

Power law for video display

A gamma characteristic is a power-law relationship that approximates the relationship between the encoded luminance in a television system and the actual desired image brightness.

With this nonlinear relationship, equal steps in encoded luminance correspond to subjectively approximately equal steps in brightness. Computer graphics systems that require a linear relationship between these quantities use gamma correction. The following illustration shows the difference between a scale with linearly-increasing intensity (i.e., gamma-corrected) scale and a scale with linearly-increasing encoded luminance signal.

Linear intensity I0.00.10.20.30.40.50.60.70.80.91.0
Linear encodingVS =  0.00.10.20.30.40.50.60.70.80.91.0


On most displays (i.e., those with a standard gamma of 2.2), one can observe that the linear-intensity scale has a large jump in perceived brightness between the intensity values 0.0 and 0.1, while the steps at the higher end of the scale are hardly perceptible. The linearly-encoded scale, which has a nonlinearly-increasing intensity, will show much more even steps in perceived brightness.

A cathode ray tube (CRT), for example, converts a video signal to light in a nonlinear way, because the electron gun it contains is a nonlinear device. The light intensity I is related to the source voltage VS according to



where γ is the Greek letter gamma. For a computer CRT, γ is about 2.2. By coincidence, this results in the perceptually homogeneous scale as shown in the diagram on the top of this page.

For simplicity, consider the example of a monochrome CRT. In this case, when a video signal of 0.5 (representing mid-grey) is fed to the display, the intensity or brightness is about 0.22 (resulting in a dark grey). Pure black (0.0) and pure white (1.0) are the only shades that are unaffected by gamma.

To compensate for this effect, the inverse transfer function (gamma correction) is sometimes applied to the video signal so that the end-to-end response is linear. In other words, the transmitted signal is deliberately distorted so that, after it has been distorted again by the display device, the viewer sees the correct brightness. The inverse of the function above is:



where VC is the corrected voltage and VS is the source voltage, for example from an image sensor that converts photocharge linearly to a voltage. In our CRT example 1/γ is 1/2.2 or 0.45.

A color CRT receives three video signals (red, green and blue) and in general each color has its own value of gamma, denoted γR, γG or γB. However, in simple display systems, a single value of γ is used for all three colors.

Other display devices have different values of gammas: for example, a Game Boy Advance display has a gamma between 3 and 4 depending on lighting conditions. In LCDs such as those on laptop computers, the relation between the signal voltage VS and the intensity I is very nonlinear and cannot be described with gamma value. However, such displays apply a correction onto the signal voltage in order to approximately get a standard γ=2.5 behaviour. In NTSC television recording, γ is 2.2.

The power-law function, or its inverse, has a slope of infinity at zero. This leads to problems in converting from and to a gamma colorspace. For this reason most formally defined colorspaces such as sRGB will define a straight-line segment near zero and add raising x+K (where K is a constant) to a power so the curve has continuous slope. This straight line does not represent what the CRT does, but does make the rest of the curve more closely match the effect of ambient light on the CRT. In such expressions the exponent is not the gamma; for instance, the sRGB function uses a power of 2.4 in it, but more closely resembles a power-law function with an exponent of 2.2, without a linear portion.

Photography

The same term (gamma) has long been used in photography to describe an analogous nonlinearity. In photography, gamma refers to the slope of the straight-line region of the sensitometry curve (Hurter–Driffield curve), which is a plot of density (or the logarithm of opacity) of the film image versus the logarithm of the film's exposure to light.

Ansel Adams describes the gamma concept, but then dismisses it as “a term of interest and significance only to the research scientist and the manufacturer”, and elaborates:[1]

“7 minutes at 68°F in Ansco 47 for Isopan” represents “normal” to me. I have no idea what the actual effective gamma is, nor do I care. I could consider this degree of development as yielding Gamma = 1.0 or being Development No. 9 or Operation H, or any other symbol I choose. But why should I inject an unnecessary and confusing symbol for a perfectly simple statement of procedure? “Isopan/Ansco 47/68°F/7minutes” is definite and easily expressed and understood as the means of obtaining my “normal” negative.


Photographic film has a much greater ability to record fine differences in shade than can be reproduced on photographic paper. Similarly, a video screen is not as capable of displaying the range of brightness which can be captured by electronic cameras. For this reason, considerable artistic effort is invested in choosing in which reduced form the original image should be presented. The gamma correction, or contrast selection, is part of the photographic repertoire used to adjust the reproduced image.

Terminology

The term intensity refers strictly to the amount of light that is emitted per unit of time and per unit of surface, in units of lux. Note, however, that in many fields of science this quantity is called luminous emittance, as opposed to luminous intensity, which is a different quantity. These distinctions, however, are largely irrelevant to gamma compression, which is applicable to any sort of normalized linear intensity-like scale.

Luminance can mean several things even within the context of video and imaging:
  • Luminance is the photometric brightness of an object, taking into account the wavelength-dependent sensitivity of the human eye (in units of cd/m²);
  • Luminance (video) is the encoded video "luma" signal, i.e. similar to the signal voltage VS.
  • Luminance (relative) is the luminance signal used in a color-space encoding, relative to a white level.
Likewise, brightness is sometimes applied to various measures, including light levels, though it more properly applies to a subjective visual attribute.

Gamma correction is a type of power law function whose exponent is the Greek letter gamma (γ). It should not be confused with the mathematical Gamma function. Gamma (lower case) is a parameter of the former; gamma (upper case, Γ) is the name of the latter (as in ). To use the word "function" in conjuction with gamma correction, one may avoid confusion by saying "generalized power law function."

References

1. ^ Ansel Adams (1968). The Negative. Morgan & Morgan, Inc. 

See also

External links

General information

Monitor gamma tools

Relative luminance follows the photometric definition of luminance, but with the values normalized to 1 or 100 for a reference white[1]. Like the photometric definition, it is related to the luminous flux density in a particular direction, which is radiant flux density
..... Click the link for more information.
The tristimulus values of a test color are the amounts of the three primary colors in a three-component color model needed to match that test color. The tristimulus values are most often given in the CIE 1931 color space, in which they are denoted , , and .
..... Click the link for more information.
Video (Latin for "I see", first person singular present, indicative of videre, "to see") is the technology of electronically capturing, recording, processing, storing, transmitting, and reconstructing a sequence of still images representing scenes in motion.
..... Click the link for more information.
A still image is a single image, as distinguished from a moving image (i.e. a movie). This phrase is used in photography, visual media and the computer industry to emphasize that one is not talking about movies, or in very precise or pedantic technical writing such as a standard
..... Click the link for more information.
A power law is any polynomial relationship that exhibits the property of scale invariance. The most common power laws relate two variables and have the form



where and are constants, and is of .
..... Click the link for more information.
RGB color model is an additive model in which red, green, and blue (often used in additive light models) are combined in various ways to reproduce other colors. The name of the model and the abbreviation ‘RGB’ come from the three primary colors, red, green, and blue and
..... Click the link for more information.
1. Electron guns 2. Electron beams 3. Focusing coils 4. Deflection coils 5. Anode connection 6. Mask for separating beams for red, green, and blue part of displayed image 7.
..... Click the link for more information.
RGB color model is an additive model in which red, green, and blue (often used in additive light models) are combined in various ways to reproduce other colors. The name of the model and the abbreviation ‘RGB’ come from the three primary colors, red, green, and blue and
..... Click the link for more information.
Photographic film is a sheet of plastic (polyester, nitrocellulose or cellulose acetate) coated with an emulsion containing light-sensitive silver halide salts (bonded by gelatin) with variable crystal sizes that determine the sensitivity, contrast and resolution of the film.
..... Click the link for more information.
Sensitometry is the scientific study of light-sensitive materials, especially photographic film. The study has its origins in the work by Ferdinand Hurter and Vero Charles Driffield (circa 1876) with early black-and-white emulsions.
..... Click the link for more information.
Microsoft Windows

Screenshot of Windows Vista Ultimate, the latest version of Microsoft Windows.
Company/developer: Microsoft Corporation
OS family: MS-DOS/9x-based, Windows CE, Windows NT
Source model: Closed source

..... Click the link for more information.
Macintosh, commonly known as Mac, is a brand name which covers several lines of personal computers designed, developed, and marketed by Apple Inc. Named after the McIntosh variety of apple, the original Macintosh was released on January 24, 1984.
..... Click the link for more information.
sRGB is a standard RGB (Red Green Blue) color space created cooperatively by HP and Microsoft for use on monitors, printers, and the Internet. It was originally proposed in 1995 by Ralf Kuron of FOGRA as a pragmatic approach in connection to ICC.
..... Click the link for more information.
A computer display monitor, usually called simply a monitor, is a piece of electrical equipment which displays viewable images generated by a computer without producing a permanent record.
..... Click the link for more information.
This article or section is in need of attention from an expert on the subject.
Please help recruit one or [ improve this article] yourself. See the talk page for details.
..... Click the link for more information.
Brightness is an attribute of visual perception in which a source appears to emit a given amount of light. In other words, brightness is the perception elicited by the luminance of a visual target. This is a subjective attribute/property of an object being observed.
..... Click the link for more information.
The aim of Color calibration is to adjust the colors of one output device to match that of another. The device that is to be calibrated is commonly known as calibration source; the device that serves as a comparison standard is commonly known as calibration target.
..... Click the link for more information.
X Window System (commonly X11 or X) is a display protocol which provides windowing on bitmap displays. It provides the standard toolkit and protocol to build graphical user interfaces (GUIs) on Unix-like operating systems and OpenVMS, and has been ported to all other
..... Click the link for more information.
sRGB is a standard RGB (Red Green Blue) color space created cooperatively by HP and Microsoft for use on monitors, printers, and the Internet. It was originally proposed in 1995 by Ralf Kuron of FOGRA as a pragmatic approach in connection to ICC.
..... Click the link for more information.
A power law is any polynomial relationship that exhibits the property of scale invariance. The most common power laws relate two variables and have the form



where and are constants, and is of .
..... Click the link for more information.
As applied to video signals, luma represents the brightness in an image (the "black and white" or achromatic portion of the image). Luma is typically paired with chroma. Luma represents the achromatic image without any color, while the chroma components represent the color
..... Click the link for more information.
Television (often abbreviated to TV, T.V., or more recently, tv; sometimes called telly, the tube, boob tube, or idiot box in British English) is a widely used telecommunication system for broadcasting and receiving moving pictures
..... Click the link for more information.
Computer graphics is a sub-field of computer science and is concerned with digitally synthesizing and manipulating visual content. Although the term often refers to three-dimensional computer graphics, it also encompasses two-dimensional graphics and image processing.
..... Click the link for more information.
1. Electron guns 2. Electron beams 3. Focusing coils 4. Deflection coils 5. Anode connection 6. Mask for separating beams for red, green, and blue part of displayed image 7.
..... Click the link for more information.
Voltage (sometimes also called electric potential difference or electrical tension) is the potential similarity of electrical potential between two points of an electrical or electronic circuit, expressed in volts.
..... Click the link for more information.
Greek alphabet
Child systems Gothic
Glagolitic
Cyrillic
Coptic
Old Italic alphabet
Latin alphabet

ISO 15924 Grek

Note: This page may contain IPA phonetic symbols in Unicode.
..... Click the link for more information.
Gamma (uppercase Γ, lowercase γ) is the third letter of the Greek alphabet. In the system of Greek numerals it has a value of 3. It was derived from the Phoenician letter Gimel .
..... Click the link for more information.
image sensor is a device that converts a visual image to an electric signal. It is used chiefly in digital cameras and other imaging devices. It is usually an array of charge-coupled devices (CCD) or CMOS sensors such as active-pixel sensors.
..... Click the link for more information.

..... Click the link for more information.
This article needs copy editing for grammar, style, cohesion, tone and/or spelling.
You can assist by [ editing it] now. A how-to guide is available, as is general .
This article has been tagged since October 2007.
..... Click the link for more information.


This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus


page counter