CBLOOM.COM real time 3d

Gamma correction test image :

gamma_test_image.gif

On the left are white and black lines, on the right are various gamma-corrected grey tones.

How to use : step back from your monitor until the left side looks like a smooth single color, not a white and black pattern. Match the intensity with the scale on the right. Doing this, I found my display has a gamma of 1.7 ; if your display is gamma-corrected, then the bottom swatch should match the intensity of the duo-tone gray on the left.

One little note on gamma that most people don't mention : Gamma is actually a nice form of compression. It's a non-linear quantization of the light value in the image. It gives more bits to dark colors, and fewer to bright colors; this is a wise decision based on the human visual system. In areas of darkness, our eyes will adjust and pick out small errors; in particular, pixel value "2" is twice as bright as pixel value "1" (in light linear space), so precision is more important there. So, don't curse at Gamma. If we didn't have displays with Gamma, we'd need 12 bit images.

Let me get more specific here : a pixel value of "1" in a gamma-corrected image come out looking like a light intensity of (1/255)^gamma ; that's 0.000005 with a gamma of 2.2 ; compare that to the value of pixel "1" in a linear light image; it's just (1/255), or 0.003922 ; in fact, to represent 0.000005 in a linear light image, you would need 18 bits per channel !! Of course, in a gamma-corrected image, you have less precision in the very-bright range, but that's not as visible to our eyes because the relative values of pixel 254 and 255 don't differ very much (and the color resolution of the eye is lower at higher intensity).

Now, some of us image scientists would LOVE to have a 16-bit image format that knows what color space it's in. PNG has these features, but no software uses them!

See the gamma FAQ

Some gamma review (this stuff always confuses me); read more
elsewhere.

displayed_intensity = pixel_value^gamma

Most monitors have a gamma between 1.7 and 2.7. Gamma correction consists of applying the 
inverse of this relationship to the image before display, i.e. by computing

gamma_corrected_pixel_value = light_linear_pixel_value^(1.0/gamma). 


pixel values averaged
(0, 1)	->	(.5)

actual displayed intensity
(0, 1)	->	(.5)^gamma

pixel value for displayed gray :

(.5)^(1/gamma)

Pixel values for gray in various gammas :

1.0 : 128
1.4 : 155
1.6 : 165
1.8 : 173
2.0 : 180
2.2 : 186
2.4 : 191


Charles Bloom / cb at my domain

Send Me Email

Back to the Index

The free web counter says you are visitor number