Gamma correction, also known as gamma encoding, is a technique used in image processing to adjust the brightness and contrast of an image to produce a more natural and visually appealing appearance.
- Gamma correction of digital images prevents too much information from being stored about highlights that humans cannot differentiate, and too little information about shadows that require more differentiation to be clearly observed.
- Gamma correction, adjusts the relationship between the numerical value of a pixel stored in an image file (think JPG or TIFF) and the brightness of that pixel when viewed on-screen.
- Gamma correction uses a power function to affect the appearance of an image. A power function is a function with a single term that is the product of a real number, a coefficient, and a variable raised to a fixed real number.
- In the case of a black and white image, a gamma function affects the highlights (whitest values), mid-tones (greyscale), and shadows (dark areas) differently.
- The appearance of an image on a digital display is determined by the voltage at each pixel:
- A computer used to display black and white images for example, translates the numerical values of each pixel in an image file into a voltage that is sent to a monitor. The higher the voltage, the brighter the pixel.
- The ideal relationship between stored value and appearance is non-linear, so a change in voltage does not necessarily translate directly into a satisfactory change in brightness so far as an observer is concerned.
- For many TVs and computer displays, doubling the voltage of a particular pixel will not make it appear twice as bright so gamma correction selectively adjusts voltages to improve the final appearance.
- The menu on most digital displays includes an option to adjust gamma settings.