Page 117 - Computational Colour Science Using MATLAB
P. 117

104 CHROMATIC-ADAPTATION TRANSFORMS AND COLOUR APPEARANCE

               Table 6.3  Data for testing implementations of CMCCAT2000. Tristimulus values (XYZ)
               under illuminant A are shown for four Munsell surfaces with the corresponding values
               (X C Y C Z C ) for illuminant D65 for the 1964 standard observer. The parameters L T , L W and F
               are fixed at 100, 100, and 1, respectively
               X          34.1827          52.1707         11.9082         43.4214
               Y          39.2556          35.6248         11.3118         43.2444
               Z          14.8082           2.0716         12.0749          4.1055
               D           0.9441           0.9441          0.9441          0.9441
                          29.7512          41.6879         12.7603         33.9602
               X C
                          40.3041          33.5491         11.9818         42.8973
               Y C
                          43.2750           7.5182         34.3499         13.5004
               Z C
               The samples that were used to test CMCCAT97 (Table 6.2) have also been used
               to test CMCCAT2000 (Table 6.3) for comparison.



               6.4.2 Computing colour appearance

               The forward mode of the CIECAM97s CAM has been implemented by the
               function ciecam97s. The format for this function is


                    [j,c,h,m,hq,s,q,cd] = ciecam97s(xyz,xyzw,la,yb,p),

               where xyz and xyzw are 361 column matrices containing the tristimulus values
               of the colour stimulus and the adopted white, respectively, under the test
               illuminant, la is the luminance of the achromatic background in units of cd/m ,
                                                                                     2
               yb is the Y value of achromatic background, and the parameter p is a 461
               column matrix containing the four surround parameters F, c, F  and N . The
                                                                        LL      C
               ciecam97s function outputs eight variables. The first seven variables correspond
               to the lightness (j), chroma (c), hue quadrature (hq), colourfulness (m), hue
               angle (h), Saturation (s) and brightness (q) of the colour stimulus under the
               reference illuminant. The eighth output parameter, cd, is a string that contains
               the colour descriptor.




                 Box 17: ciecam97s.m

                 function [j,c,hq,m,h,s,q,cd] = ciecam97s(xyz,xyzw,
                 la,yb,para)

                 % function [j,c,hq,m,h,s,q,cd] = ciecam97s(xyz,xyzw,
                 % la,yb,para)
   112   113   114   115   116   117   118   119   120   121   122