Page 207 - Computational Colour Science Using MATLAB
P. 207

194                       COLOUR TOOLBOX

                    % lt is the luminance of the adapting test field
                    % and has default value of 100
                    % lw is the luminance of the adapting reference field
                    % and has default value of 100
                    % xyzc contains the tristimulus values of the
                    % stimulus under the reference illuminant









               11.17 ciecam97s.m (Box 17)



                    % function [j,c,hq,m,h,s,q,cd]=ciecam97s(xyz,xyzw,
                    la,yb,para)
                    % implements the CIECAM97s colour appearance model
                    % operates on 1 by 3 matrix xyz containing tristimulus
                    % values of the stimulus under the test illuminant
                    % xyzt and xyzr are 1 by 3 matrices containing the
                    % white points for the test and reference conditions
                    % la and yb are the luminance and Y tristimulus values of
                    % the achromatic background against which the sample is
                    % viewed
                    % para is a 1 by 4 matrix containing c, Nc, Fll and F









               11.18 gogtest.m (Box 18)



                    % function [err] = gogtest(gogs,dacs,rgbs)
                    % computes the error between measured and predicted
                    % linearized dac values for a given set of GOG values
                    % gogs is a 2 by 1 matrix that contains the gamma and gain
                    % dacs is an n by 1 matrix that contains the actual RGB values
                    % obtained by dividing the RGB values by 255
                    % rgbs is an n by 1 matrix that is obtained from a linear
                    % transform of measured XYZ values
   202   203   204   205   206   207   208   209   210   211   212