Developer Reference

  • 2021
  • 01/15/2021
  • Public Content
Contents

Gamma Correction

Gamma correction of images is used to optimize the usage of data type depth when encoding an image by taking advantage of the non-linear manner in which humans perceive light and color. This non-linearity must be compensated to achieve correct color reproduction. To do this, luminance of each of the linear red, green, and blue components is reduced to a non-linear form using an inverse transformation. This process is called
gamma correction
.
The Intel IPP functions use the following basic equations to convert an RGB image to a gamma-corrected R'G'B' image:
for
R
,
G
,
B
< 0.018
R' = 4.5R
G' = 4.5G
B' = 4.5B
for
R
,
G
,
B
0.018
R' =1.099R
0.45
- 0.099
G' =1.099G
0.45
- 0.099
B' =1.099B
0.45
- 0.099
Note that the channel intensity values are normalized to fit in the range [0..1]. The gamma value is equal to 1/0.45 = 2.22 in conformity with ITU Rec.709 specification (see [ITU709]).

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.