ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/notes/gamma_corr
Revision: 1.2
Committed: Thu Jan 1 19:31:45 2004 UTC (20 years, 4 months ago) by greg
Branch: MAIN
CVS Tags: rad5R4, rad5R2, rad4R2P2, rad5R0, rad5R1, rad3R7P2, rad3R7P1, rad4R2, rad4R1, rad4R0, rad3R6, rad3R6P1, rad3R8, rad3R9, rad4R2P1, rad5R3, HEAD
Changes since 1.1: +1 -1 lines
Log Message:
Renamed rview, lam, calc, and neat to rvu, rlam, icalc, and neaten

File Contents

# User Rev Content
1 greg 1.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 greg 1.2 control gamma correction for rvu, for example.
19 greg 1.1
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