


result = cmatrix(matrixtype, spacetype)
Returns a 3x3 color matrix used by changeColorSpace.
matrixtype has the following options:
'lms2opp' -- cone coordinate to opponent (Poirson & Wandell 1993)
'opp2lms' -- inverse of the above matrix
'xyz2opp' -- xyz to opponent (CIE1931 2 degree XYZ)
'opp2xyz' -- inverse of the above matrix
'lms2xyz' -- Hunt-Pointer-Estevez transformation from cone
to XYZ, normalized for D65 (lms=[100 100 100] for D65).
'xyz2lms' -- inverse of lms2xyz.
'xyz2yiq' -- convert from XYZ to YIQ
'yiq2xyz' -- inverse of the abvoe matrix
'rgb2yuv' -- convert from RGB to YUV (YCbCr) for JPEG compression
'yuv2rgb' -- inverse of the above matrix
'xyz2srgb' -- from XYZ to sRGB values
'srgb2xyz' -- inverse of the above matrix
(the above are not dependent on device calibration)
'rgb2lms' -- monitor rgb to cone coordinate
'lms2rgb' -- inverse of the above matrix
'rgb2xyz' -- rgb to xyz 2 degree.
'xyz2rgb' -- inverse of the above matrix
(The above transformation matrices are based on the
calibration of the monitor used in Poirson&Wandell(1993)
experiment. If possible, you should provide this
matrix based on calibration data of your own device,
instead of using this one. This is only a default when you
don't have calibration data available for your device).
spacetype specifies what type of xyz space (CIE1931 2 degree or
CIE1964 10 degree) is required.
spacetype = 2: cie1931 2 degree XYZ (default)
spacetype = 10: cie1964 10 degree XYZ
Xuemei Zhang 3/11/96
Last modified 1/22/98