ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/macbeth.cal
Revision: 1.1
Committed: Sat Feb 22 02:07:21 2003 UTC (21 years, 2 months ago) by greg
Branch: MAIN
CVS Tags: rad5R2, rad4R2P2, rad5R0, rad5R1, rad3R7P2, rad3R7P1, rad4R2, rad4R1, rad4R0, rad3R5, rad3R6, rad3R6P1, rad3R8, rad3R9, rad4R2P1
Log Message:
Changes and check-in for 3.5 release
Includes new source files and modifications not recorded for many years
See ray/doc/notes/ReleaseNotes for notes between 3.1 and 3.5 release

File Contents

# Content
1 {
2 Macbeth color checker chart.
3 Creates four rows of 6 color squares each.
4 Color order, starting from lower left and reading right then up:
5
6 Color x y Y (CIE 1931 under Illuminant C)
7 ===== ===== ===== =====
8 DarkSkin .4002 .3504 10.05
9 LightSkin .3773 .3446 35.82
10 BlueSky .2470 .2514 19.33
11 Foliage .3372 .4220 13.29
12 BlueFlower .2651 .2400 24.27
13 BluishGreen .2608 .3430 43.06
14 Orange .5060 .4070 30.05
15 PurplishBlue .2110 .1750 12.00
16 ModerateRed .4533 .3058 19.77
17 Purple .2845 .2020 6.56
18 YellowGreen .3800 .4887 44.29
19 OrangeYellow .4729 .4375 43.06
20 Blue .1866 .1285 6.11
21 Green .3046 .4782 23.39
22 Red .5385 .3129 12.00
23 Yellow .4480 .4703 59.10
24 Magenta .3635 .2325 19.77
25 Cyan .1958 .2519 19.77
26 White .3101 .3163 90.01
27 Neutral.8 .3101 .3163 59.10
28 Neutral.65 .3101 .3163 36.20
29 Neutral.5 .3101 .3163 19.77
30 Neutral.35 .3101 .3163 9.00
31 Black .3101 .3163 3.13
32 }
33 xres : 512; { settable x resolution }
34 gap : xres/64; { gap between patches }
35 biggap : 16+gap;
36 pwidth : (xres-gap)/6 - gap; { patch width }
37 pheight : pwidth;
38 yres : pheight*4 + biggap*4 + gap; { for square patches }
39 gapgrey : 0; { value for gap pixels }
40 or(a,b) : if( a, a, b );
41 and(a,b) : if( a, b, a );
42 mod(n,d) : n - floor(n/d)*d;
43
44 ingap = if(or(gap-mod(x,pwidth+gap),biggap-mod(y,pheight+biggap)), 1, -1);
45
46 ro = if(ingap, gapgrey, redval);
47 go = if(ingap, gapgrey, grnval);
48 bo = if(ingap, gapgrey, bluval);
49
50 { Patches are numbered starting from 0 at the upper left, English order }
51
52 n = floor(x/(pwidth+gap)) + 6*floor((yres-1-y)/(pheight+biggap));
53
54 { The following were computed from the published CIE 1931 XYZ values
55 using the following definitions of the three primaries and white:
56
57 Color x y
58 ===== = =
59 Red .640 .330
60 Green .290 .600
61 Blue .150 .060
62 White .333 .333
63
64 redval=select(n+1,0.1486842,0.4729399,0.1079659,0.08712918,
65 0.2051028,0.1392646,0.5821536,0.06337776,0.4590441,0.09402137,
66 0.319248,0.6564189,0.02655103,0.06694206,0.3670574,0.7136942,
67 0.425348,0,0.7898659,0.5186209,0.3176663,0.1734879,0.07897781,
68 0.02746673);
69 grnval=select(n+1,0.08463139,0.3204288,0.2051882,0.1576957,
70 0.2280522,0.5390015,0.2154359,0.1079601,0.09839423,0.0426486,
71 0.5293968,0.3799829,0.04445694,0.3150952,0.02880633,0.5982432,
72 0.09023558,0.2530342,0.925279,0.6075324,0.3721264,0.2032304,
73 0.09251762,0.03217557);
74 bluval=select(n+1,0.06746537,0.2793655,0.4195167,
75 0.06372649,0.5480446,0.5015115,0.02782678,0.47622,0.1554321,
76 0.1866896,0.05423259,0.0301096,0.3746091,0.07726951,0.05228816,
77 0.01403399,0.3776974,0.4719555,1.090738,0.7161716,0.4386702,
78 0.2395721,0.1090617,0.03792922);
79 }
80
81 { The following were computed from measured spectra, using same primaries: }
82
83 redval = select(n+1, 0.168584, 0.633823, 0.118789, 0.071288, 0.271119,
84 0.160804, 0.699359, 0.076245, 0.599413, 0.113352,
85 0.325668, 0.745543, 0.037489, 0.056075, 0.537591,
86 0.834969, 0.568191, 0.008597, 0.91942, 0.602537,
87 0.36137, 0.201045, 0.088912, 0.030925);
88 grnval = select(n+1, 0.069446, 0.337209, 0.19066, 0.131171, 0.219394,
89 0.492803, 0.257105, 0.089464, 0.112735, 0.032193,
90 0.50756, 0.415383, 0.03581, 0.301005, 0.025739,
91 0.639189, 0.094541, 0.207922, 0.918992, 0.606277,
92 0.36625, 0.200417, 0.0877122, 0.03085);
93 bluval = select(n+1, 0.031966, 0.252572, 0.344106, 0.025464, 0.455498,
94 0.436593, 0.003501, 0.366442, 0.126229, 0.129459, 0.04907,
95 0.005622, 0.293019, 0.071808, 0.037301, 0, 0.303893,
96 0.395988, 0.884604, 0.596902, 0.360222, 0.195084,
97 0.0852725, 0.030359);