ColorSeparate

ColorSeparate[image]
gives a list of single-channel images corresponding to each of the color channels in image.

ColorSeparate[image, colorspace]
gives a list of images corresponding to the components of colorspace.

DetailsDetails

  • ColorSeparate works with images containing any number of color channels.
  • ColorSeparate[image, {c1, c2, ...}] extracts the specified color components.
  • The following color space specifications can be given:
  • "Grayscale","Gray","Intensity"graylevel intensity
    "RGB"red, green, blue
    "RGBA"red, green, blue, alpha
    "CMYK"cyan, magenta, yellow, black
    "Cyan","Magenta","Yellow","Black"cyan, magenta, yellow, black
    "HSB"hue, saturation, brightness
    "Red","Green","Blue"red, green, or blue channel
    "Hue"hue
    "Saturation"saturation
    "Brightness"brightness
    "Mean"mean of all channels
    "Alpha"alpha channel
    "Luminance"luminance channel
    "XYZ"channels of the CIE XYZ color space
    "LAB"channels of the CIE LAB color space
    "LUV"channels of the CIE LUV color space
  • ColorSeparate also works with Image3D objects.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Separate an RGB image into three channels:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input

Separate the channels of an HSB image:

In[1]:=
Click for copyable input
Out[1]=
New in 7 | Last modified in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »