Gamma correction

Gamma correction

A display does not reproduce the RGB signal on the screen as it is. Like a photographic film, a display has characteristics and the screen brightness is not proportional to the signal. Let  x  be the value of RGB (the maximum value is 1), and  y  be the brightness of the screen (the maximum value is 1), then the characteristic curve of the display can be approximated by   y = xγ.   The value of γ (gamma) varies slightly depending on the display model or the settings, but the standard value is 2.2. If the RGB intensity is passed to the display as it is, the screen will be darker and color balance will be lost, so the colors cannot be reproduced correctly (see the figure). To avoid this, gamma correction is used to increase the RGB values ​​in advance and make the characteristic as linear as possible.

Usually, RGB values ​​of an image obtained by digital cameras and scanners have already been gamma-corrected so that images can be displayed naturally on a standard display (with gamma value 2.2). However, if the setting of the display deviates from the standard, the image is displayed brighter or darker. Furthermore, an image adjusted on a display whose gamma is significantly different from the standard will be unnatural when displayed or printed in a standard environment. To avoid this, it is necessary to set the color environment of a computer to a standard one.

display's characteristic curve gamma correction
Display characteristics Gamma correction (applying inverse function)


Windows standardizes displays with a gamma value of 2.2. The Macintosh had used a bright display with a gamma of 1.8 as a standard, so the same image appeared brighter (slightly whitish) than Windows. However, since Mac OS 10.6 (Snow Leopard), the standard has been changed to 2.2, the same as Windows. Now the standard gamma has been unified to 2.2, we must try to set the display gamma to 2.2.

I have made test patterns to check the gamma of the display, so I would like to use it to adjust the brightness of the display. The gamma of the current environment is where the inside of the square looks the same as the surroundings. If you adjust so that the square of 2.2 disappears, it will be the standard setting.

Single gamma
Gamma Test Chart

Gamma by color
Gamma Test Chart RGB


You can adjust the gamma of the display in Mac OS X by selecting "Color" from the display in System Preferences, selecting "Correction" in the color profile assigned to the display, and changing the default settings. (see the figure below). In addition to the gamma value, the white balance (color temperature) can be changed.
In Windows, when you select "Color Management" → "Details" → "Display Adjustment" from the control panel, the color adjustment wizard starts and you can fine-tune gamma and color balance (see the figure below). A gamma or color balance may be adjusted by an adjustment program provided by a graphic adapter manufacturer.

display (Mac)
display (Win 10)
Color setting of Mac OS X display
Gamma and white balance can be
changed by selecting "Correction ..."
Display adjustment screen of Windows
Gamma can be adjusted by selecting
"Color Management"



The photos below are the image with linear RGB values (proportional to the light energy) and the image with gamma-corrected RGB values. We can see that the image with linear RGB values is too dark due to the characteristics of a display, and the color balance looks unnatural.

linear RGB gamma RGB
An image saved with linear RGB values
proportional to the light enegy.

An image saved with gamma-corrected RGB values, as usual.

The next figure shows stepwise color gradations. The top one has RGB values with equal intervals, while the bottom one has gamma-corrected RGB values. Of course the top one looks more natural. The gradation tool of Photoshop and Illustrator, unfortunately, seems not to support the gamma correction.

color bar
(top) Gradation having RGB values with equal intervals,
(bottom) gradation having gamma-corrected RGB values.

Adjusting the brightness of an image

With Adobe Photoshop's "Levels", you can adjust the gamma to change the brightness of the entire image by sliding the knob. The center knob is for gamma adjustment, and the gamma value is displayed as a numerical value (1.00 for no conversion). Please use this function to correct the brightness of photos.
* The knobs at both ends are for black level and white level adjustment, respectively. Use when the black image is not too dark and the white is not bright enough for a scanned image.

Photoshop Levels



Back
T. Fujiwara