Page 30 - Computational Colour Science Using MATLAB
P. 30

LINEAR AND NON-LINEAR TRANSFORMS                     17
               For a given standard matrix A it is trivial to compute w given x. However, it is
             not trivial to compute x given w. This situation corresponds, of course, to the
             problem of solving simultaneous equations and in the example given by
             Equation (2.3) there are four variables (the entries of the column matrix x) and
             three equations. When the number of equations is less than the number of
             variables we say that the system is under-determined (a system is said be over-
             determined if the number of equations is greater than the number of variables).
               A common method for solving for x in Equation (2.3) is to multiply both sides
                                                                                   1
             of the equation by the inverse of the standard matrix which we denote A .
             However, the inverse of a non-square matrix is not defined and therefore
             numerical methods must be employed to compute the pseudoinverse matrix
                         +
             denoted by A .
               Recall (Section 2.2) that the product of a matrix and its inverse yields the
             identity matrix and therefore we can write
                    1       1                1
                  A w ¼ A Ax      or  x ¼ A w:                                   ð2:4Þ
             A solution for x is therefore possible if we can compute the inverse (or
             pseudoinverse) of the standard matrix A.
               Linear algebra can be used to find mappings between one set of data and
             another and this is sometimes called function approximation. Now, the problem
             is to find the standard matrix A given examples of data from each of the sets.
             Imagine, for example, that we have a set of n camera RGB response values and
             we wish to find a linear transform between the corresponding n known XYZ
             tristimulus values. Formally, if we define T as the 36n matrix of tristimulus
             values and C as the 36n matrix of camera values, then we seek a transformation
                        3
                              3
             of type T: < !< or explicitly in this case T: C ! T. Thus, we need to find the
             coefficients a 11  to a for the following three equations:
                              33
                  X ¼ a 11 R þ a 12 G þ a 13 B,
                  Y ¼ a 21 R þ a 22 G þ a 23 B,
                  Z ¼ a 31 R þ a 32 G þ a 33 B.

             In matrix algebra we need to find the 3 3 standard matrix A where

                  T ¼ AC.                                                        ð2:5Þ
             Note that if we considered each row of A separately for the first row we can write
             that

                  X ¼ a 11 R þ a 12 G þ a 13 B,
             where X is the X tristimulus value, RGB are the camera values, and a , a and
                                                                               12
                                                                            11
             a 13  are the coefficients that form the first row of A. If we now consider the n
             known samples we can write
   25   26   27   28   29   30   31   32   33   34   35