Page 57 - Computational Colour Science Using MATLAB
P. 57

44              COMPUTING CIE TRISTIMULUS VALUES

                 % note that 100/sum(cie(:,2)) is the normalising factor k
                 % so that Y = 100 for a perfect reflecting diffuser




                 The command load weights.mat loads the values of ASTM Table 5 and the
               whos command would reveal the following variables:


                    Name       Size        Bytes     Class
                    a___64     43x3        1032      double array
                    a___31     43x3        1032      double array
                    c___64     43x3        1032      double array
                    c___31     43x3        1032      double array
                    d50___64   43x3        1032      double array
                    d50___31   43x3        1032      double array
                    d55___64   43x3        1032      double array
                    d55___31   43x3        1032      double array
                    d65___64   43x3        1032      double array
                    d65___31   43x3        1032      double array
                    d75___64   43x3        1032      double array
                    d75___31   43x3        1032      double array
                    f2___64    43x3        1032      double array
                    f2___31    43x3        1032      double array
                    f7___64    43x3        1032      double array
                    f7___31    43x3        1032      double array
                    f9___64    43x3        1032      double array
                    f9___31    43x3        1032      double array

               The file weights.mat therefore contains weights that represent the 1964 and 1931
               colour-matching functions for the CIE illuminants A, C, D50, D55, D65, D75,
               F2, F7 and F9. The leftmost column in the preceding list shows the valid
               observer/illuminant options that can be used as the fourth argument in r2xyz.
               The white points of the illuminants are given (ASTM, 2001) by Table 4.2.
                 Following some basic checks on the arguments to the function the issue of
               truncation is addressed in the r2xyz code. If the reflectance data are only
               available at 400 nm and higher, for example, then the values of the weights at
               wavelengths lower than 400 nm are added to the value of the weights at 400 nm.
               Summation of the product of the weights and the reflectance data is then
               performed at 400 nm and upwards. This is equivalent to extending the reflectance
               data below 400 nm using the value of reflectance at 400 nm. A similar process is
               carried out for the upper wavelength that is available. This procedure is in
               accordance with the CIE recommendation for dealing with truncated reflectance
               data.
   52   53   54   55   56   57   58   59   60   61   62