Mathematica 9 is now available
Previous section-----Next section

3.5 Color Space Conversion

The RGB (red, green, blue) color scheme is just one of many color representation methods used in practice. The three so-called primary colors are combined (added) in various proportions to produce a composite, full-color image. The RGB color model is universally used in color monitors and color video cameras and is implemented in the Mathematica graphics directive RGBColor. Also, the human visual system is tuned to perceive color as a variable combination of these primary colors. The primary colors added in equal amounts produce the secondary colors of light: cyan (C), magenta (M), and yellow (Y). These are the primary pigment colors used in the printing industry and thus the relevance of the CMY color model.
In[1]:=
Out[1]=Out[1]=

Color format conversion functions.

In[2]:=
In[3]:=
In[4]:=
Out[4]=Out[4]=
In[5]:=
Out[5]//InputForm=Out[5]//InputForm=
In[6]:=
Out[6]//InputForm=Out[6]//InputForm=
In[7]:=
Out[7]//InputForm=Out[7]//InputForm=
The CIE (International Commission on Illumination) color spaces L*u*v* and L*a*b* are device independent, colorimetric (i.e., perceptually equal colors are numerically equal), and perceptually uniform (i.e., color differences of a given magnitude are equally perceptible irrespective of the region of the color space being examined) [Poy03]. It should be noted that this is not the case with the common RGB color space. These properties make the CIE color spaces especially valuable for measuring and quantifying changes in color images. Channel L* represents lightness, while channels a* and b* (or u*, v*) roughly represent the color differences red minus green and green minus blue, respectively. It has been demonstrated [Kas92] that the L*a*b* color space separates color from luminance better than any other color model.
In[8]:=
Out[8]=Out[8]=
In[9]:=
Out[9]=Out[9]=
In Section 2.4 we introduced the function RawImageData, which is used to extract raw data from an ImageData expression. On occasion, it may be of interest to perform the inverse operation (i.e., construct an ImageData object given raw data in one of the supported formats, see Equations (2.2.1), (2.3.1), and (2.3.2)). Here we take raw image data in pixel-interleaved form and convert to a composite RGB color image.
In[10]:=
In[11]:=
Out[11]=Out[11]=

Color value transformations.

In[12]:=
Out[12]=Out[12]=
In[13]:=
Out[13]=Out[13]=


Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.