Page 143 - Computational Colour Science Using MATLAB
P. 143

130                CHARACTERIZATION OF CAMERAS
               where A is the 363 system matrix. If three suitable samples are available, then
               the linear system is exactly determined. Further samples could be used, to over-
               determine the system, but are only strictly necessary if a linear transform does
               not exist between the two colour spaces. In this situation it is usually preferable
               to use a non-linear transform. Johnson (2002) notes that, even if a non-linear
               transform is used, it is usually better to perform a linearization process and then
               use approximately linear values as input to the non-linear transform.
                 Various non-linear transforms can be used such as
                                                2
                                                              2
                                                       2
                    X ¼ a 11 R þ a 12 G þ a 13 B þ a 14 R þ a 15 G þ a 16 B þ a 17 RGB þ a 18 ,
                                                2
                                                       2
                                                              2
                    Y ¼ a 21 R þ a 22 G þ a 23 B þ a 24 R þ a 25 G þ a 26 B þ a 27 RGB þ a 28 ,  ð8:3Þ
                                                       2
                                                2
                                                              2
                    Z ¼ a 31 R þ a 32 G þ a 33 B þ a 34 R þ a 35 G þ a 36 B þ a 37 RGB þ a 38 ,
               where, in this case, a total of 24 coefficients need to be determined. In matrix
               notation we can write
                    T ¼ AD,                                                       ð8:4Þ
               where the system matrix A is now a 368 matrix of the coefficients a –a . The
                                                                             11
                                                                                38
               matrix D is the 86n column matrix of augmented device responses [in the case of
               Equation (8.3) this is given by the terms R, G, B, R , G , B , RGB and 1].
                                                                    2
                                                              2
                                                                 2
                 The system is determined by computing the pseudoinverse (see Chapter 2,
               Section 2.4) of the augmented matrix; thus
                    A ¼ D T.                                                      ð8:5Þ
                         þ
               As an alternative to linear or non-linear transforms of this type it is also possible
               to use a neural network to perform a mapping from C to T. However, it has been
               shown that neural networks offer no advantage over polynomial transforms for
               camera characterization (Cheung and Westland, 2002) and yet can be difficult
               and time-consuming to train.




               8.4 Implementations and examples

               The first stage in characterizing an input device such as a scanner or a camera is
               to linearize the measured RGB values. Table 8.1 lists the camera RGB values and
               the mean reflectances for the grey samples of the Macbeth ColorChecker chart
               which were measured using a typical high-end digital camera (Cheung and
               Westland, 2002). Note that the first row of data in Table 8.1 does not show
               measured values but implies that the camera gives a zero response for a zero
               signal.
                 Figure 8.1 shows the relationship between the camera responses and the mean
               reflectance P for the neutral patches of the ColorChecker. It is noticeable that
               there is an approximately linear relationship between the RGB values and the P
   138   139   140   141   142   143   144   145   146   147   148