| 1 |
SETTING GAMMA FOR A SPECIFIC MONITOR
|
| 2 |
|
| 3 |
Gamma correction is a crude way of compensating for the nonlinear
|
| 4 |
response function of a display device. Most CRT monitors roughly follow
|
| 5 |
a power law in their response function, ie:
|
| 6 |
|
| 7 |
output luminance = signal ^ gamma
|
| 8 |
|
| 9 |
where gamma is typically between 1.5 and 3. Some system software
|
| 10 |
attempts to partially compensate for this natural response function, but
|
| 11 |
usually does not completely eliminate it (which would have other
|
| 12 |
undesirable effects).
|
| 13 |
|
| 14 |
Most of the Radiance display drivers look at an environment variable
|
| 15 |
called "DISPLAY_GAMMA" to determine how to set the gamma correction for the
|
| 16 |
current monitor. Many programs also have a -g option for setting the
|
| 17 |
gamma value explicitly, but the environment variable is the only way to
|
| 18 |
control gamma correction for rvu, for example.
|
| 19 |
|
| 20 |
To determine the approximate gamma for your monitor, display of the
|
| 21 |
distributed picture file ray/lib/lib/gamma.pic like so:
|
| 22 |
|
| 23 |
% ximage -g 1 -b ray/lib/lib/gamma.pic &
|
| 24 |
|
| 25 |
Note that the gamma here has been explicitly set to 1, effectively
|
| 26 |
turning gamma correction off for this test.
|
| 27 |
|
| 28 |
Now, set the contrast and brightness controls on the monitor to what you
|
| 29 |
would consider your normal settings. Stand back from the monitor a bit
|
| 30 |
and try to match up the average brightness of the stripes on the left of
|
| 31 |
the image with a patch on the right of the image. This will be the
|
| 32 |
gamma value for this monitor.
|
| 33 |
|
| 34 |
All that's left to do is to put a line of the form:
|
| 35 |
|
| 36 |
setenv DISPLAY_GAMMA 2.2
|
| 37 |
|
| 38 |
in your .login or .cshrc file for C-shell users, or:
|
| 39 |
|
| 40 |
DISPLAY_GAMMA=2.2
|
| 41 |
export DISPLAY_GAMMA
|
| 42 |
|
| 43 |
in your .profile for Bourne shell users. You may also use a more
|
| 44 |
complicated setting for different monitors if you use many displays, eg:
|
| 45 |
|
| 46 |
if ( $?DISPLAY && ! $?DISPLAY_GAMMA ) then
|
| 47 |
switch ($DISPLAY)
|
| 48 |
case pink*:
|
| 49 |
case floyd*:
|
| 50 |
setenv DISPLAY_GAMMA 1.8
|
| 51 |
breaksw
|
| 52 |
case hobbes*:
|
| 53 |
case demo460*:
|
| 54 |
setenv DISPLAY_GAMMA 2.6
|
| 55 |
breaksw
|
| 56 |
case wimsey*:
|
| 57 |
setenv DISPLAY_GAMMA 1.7
|
| 58 |
breaksw
|
| 59 |
endsw
|
| 60 |
endif
|