# Gamma correction

 related topics {math, energy, light} {system, computer, user} {math, number, function} {style, bgcolor, rowspan} {film, series, show}

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.[1] 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. A gamma value γ < 1 is sometimes called an encoding gamma, and the process of encoding with this compressive power-law nonlinearity is called gamma compression; conversely a gamma value γ > 1 is called a decoding gamma and the application of the expansive power-law nonlinearity is called gamma expansion.

## Contents

### Explanation

The electron-gun current–voltage curve in a cathode ray tube (CRT) monitor system is a nonlinear luminance decoder. For a linear luminance input, most of the luminance output values appear at the darker end of the spectrum, because of the triode characteristic of the electron gun. Gamma encoding helps to cancel this nonlinear decoding so that the output picture has the proper (linear) luminance values.

Gamma compression, also known as gamma encoding, is used to encode linear luminance or RGB values into video signals or digital video file values; gamma expansion is the inverse, or decoding, process.

The following figure shows the behavior of a typical display when image signals are sent linearly (γ = 1.0) and gamma-encoded (gamma compressed with γ = 1/2.2 for a γ = 2.2 standard display). In the first case, the resulting image over the CRT is notably darker and contrastier than the original, whereas it is shown with high fidelity in the second case. Digital cameras produce, and TV stations broadcast, signals in gamma-encoded form, anticipating the standardized gamma of the reproducing device, so that the overall system will be linear, as shown on the bottom; if cameras were linear, as on the top, the overall system would be nonlinear. Similarly, image files are almost always stored on computers and communicated across the Internet with gamma encoding.