White Point Correction of Macbeth ColorChecker
The original data for the Macbeth ColorChecker was contained in a file called 'macbethChart.m'. This file contains the surface reflectance values at different wavelength of light for the Macbeth ColorChecker. The CIE-XYZ values were then determined by the following equation:
macbethXYZ = XYZ' * diag(lgt) * macbethChart;
We also have handy, the transformation matrix 'xyz2rgb', which will take the XYZ values of an image and transform them to RGB values. We can obtain the Macbeth RGB values by the following:
macbethLinearRGB = xyz2rgb * macbethXYZ;
Since we know that surface 19 is a white surface, it's RGB values should be (1,1,1) or some other values (max,max,max), where max is the maximum value of the matrix. When I displayed the RGB values of the white surface however, it had the values of (164.1674, 96.2409, 77.1319). This appears to have a reddish-yellowish tone and could be the effects of the light source that was used to obtain these values. (D65 was the light source, which is commonly used as a standard simulation for daylight. Daylight has a reddish-yellowish tone.) I also noticed that 164.1674 is the maximum value for the entire matrix, which makes sense, since we would expect white to have the highest components of R, G, and B. To correct for such a reddish-yellowish cast, we need to divide the entire matrix by the white surface. This white-point correction will adjust the colors of the image so that it will display the true colors of the Macbeth ColorChecker.
When we had to cast the color filters of our own onto the Macbeth ColorChecker, we had to take into account the step of white point correction. I had to make sure to adjust the white point of the image accordingly, in order to obtain the proper color casts that we desire. For instance, if I were to add a red cast to the image, I would need to multiply the red components of the image (row 1 of macbethLinearRGB) by a specified factor. I performed this step before the white point correction. I then need to divide the corresponding component of the white point (in this case, wht(1)) by the same factor. Finally, white point correction can be carried out without affecting the color cast we put in.
For more details, please refer to lines 22 - 40 in the file generateMB.m.