Page 165 - Computational Colour Science Using MATLAB
P. 165

152                CHARACTERIZATION OF PRINTERS

                   x = linspace(0,1,101);
                   y = polyval(p,x);
                   hold on
                   plot(x,y,’k-’)
                 end







                 The built-in MATLAB function polyfit is then used to fit a third-order
               polynomial between the actual and target coverage areas and the coefficients of
               this fit are returned in the matrix p. The full syntax for gettrc is

                    function [p] = gettrc(dig,R,w,solid,n,graphs)

               where dig is a 16r matrix of target area coverages, R is an r6m matrix of
               measured reflectance values, w is a 16m matrix of reflectance for the white
               substrate, solid is a 16m matrix of reflectance for the solid ink, n is a 161 matrix
               containing the free parameter [see Equation (9.5)] to determine the non-linearity,
               r is the number of target coverage areas, m is the number of wavelengths
               (usually 31) at which the reflectance data are measured and graphs ¼ ‘on’
               causes a plot of the actual versus target areas to be generated. Once the
               characteristics of the tone-reproduction curve have been established using gettrc
               any target coverage can be converted to the actual coverage using the polyval
               command:

                    actual = polyval(p,target)


               where target and actual are 161 matrices that hold the target and actual area
               coverage values and p is the output of the gettrc function. Figures 9.4 and 9.5
               show the result of the gettrc function for n ¼ 1 and n ¼ 20, respectively, for each
               of the three inks.
                 The optimum value of n may be found to give the lowest prediction error
               for the reflectances of the inks printed on their own at various coverage
               areas and in mixture with other inks. For this example application, a value
               of n ¼ 20 was found to be optimum. The tone reproduction curves allow the
               target areas to be converted to actual areas and these may be used with
               the n-modified Neugebauer equations to predict the spectral reflectance
               for combinations of inks. For a single ink, and measurements at 31
               wavelengths between 400 and 700 nm, the colour difference between the
               predicted reflectance and the measured reflectance is predicted using the
               following code:
   160   161   162   163   164   165   166   167   168   169   170