Face-Based Luminance Matching: lumGamma.tcl

Running this program to determine gamma is a necessary first step in creating colormaps with lumMakeMap.tcl. It also provides the very useful utility of checking to see if your black level ("brightness") is correctly set on your monitor.

Like many other gamma-measurement images and applets, this relies on the alternating line trick to create a gray level with half the luminance of some other gray level. There are three colors in involved:

Assuming that your monitor's black level is set correctly, then the intensity of light coming off the monitor in regions of level L should be pow(L,g), where g is the gamma of the CRT. However, because we alternate between lines at L and at zero, the intensity of light in the lines region is nominally pow(L,g)/2.

When you slide the "Gamma" slider back and forth, you're actually changing the level of H. You can perceive when the luminances of the solid gray matches the luminance of the alternating lines, and because both are the same color, this also means the intensities match, which means that:

pow(H,g) = pow(L,g)/2
or:
H = pow(pow(L,g)/2, 1/g)
This is how the value for H is computed based on the position of the "Gamma" slider. You may find that its easier to see the match by taking off your glasses, or squinting. As with the other face-based programs, you can click inside the image to change the levels. Click and drag away from the positive face to move towards a better match.

You can try two different face images, and two other geometric patterns. At one point I was convinced that the face works better than any other geometric pattern, but I think the checkers pattern is the best, because of how it only has diagonal edges. This means the boundary between the solid and alternating regions never stands out, as it does with the square, as well as the face images, in some places. I'd be curious to hear which image you think works the best. This program also allows you to see if your different guns (red, green, blue) actually have different gammas.

The other important function of this program is to determine if your black level is set correctly. The program starts with the second slider, "Level", all the way to the right. After you're satisfied that the solid and alternating regions match, move the "Level" slider downward. If one or the other face starts showing up as positive, instead of both remaining in balance, then your black level is not correctly set. See this page for information on fixing this. Once you've set black level, you need to re-measure gamma.

When you're done measuring gamma, leave the "Gamma" slider at the value you determined. When you press the "Save + Quit" button, two small files will be created, "gamma.txt", and "igamma.txt", which contain the numerical values of the gamma and its reciprocal. These files are read used by the genMaps.txt script, in order to do luminance-controlled interpolation between the colormap control points.