XYZ Conversion



            The next step in removing the influence of our image-taking device from the image data is to convert from linear RGB values to XYZ space. This is a simple linear transformation gained by solving for rgb2xyz in the equation:

 XYZ[3xn] = rgb2xyz[3x3] * RGB[3xn]

In MATLAB notation, this becomes:

 rgb2xyz = inv(RGB/XYZ)

We use the entire set of data taken from the Macbeth ColorChecker to get the most precise transformation matrix available to us. The RGB matrix is the set of linearized RGB values given by our gamma correction. The XYZ matrix is the set of readings taken for each Macbeth swatch by the spectroradiometer. We find that the transformation matrix rgb2xyz is:

 [0.0028  0.0022  0.0006
  0.0016  0.0032  0.0004
   0.0001  0.0004  0.0013]

We have created a MATLAB function, toxyz.m that uses this tranformation matrix to compute XYZ values given a set of linear RGB values.

start  back  next