Color separation

Algorithm

The Color separation operation allows you to extract different 'bands' for instance from a scanned or digital color photo as if using color filters when taking the picture. After color extraction, you can perform the normal Image Processing operations like Filtering, Classification, etc. on these bands.

Maps that have a Picture domain or the (24 bit) Color domain store for each pixel three values: Red, Green and Blue. The Color separation operation allows you to retrieve for each pixel either the Red, Green or Blue value and store these in a separate map. You can also retrieve Yellow, Magenta, Cyan, combined Gray values, or Hue, Saturation or Intensity values for each pixel.

For each pixel the selected color is retrieved. Red, Green and Blue values are directly retrieved from the map or the picture domain. When another color is selected, one of the following formulas is applied:

  

Yellow

=

255 - Blue

Magenta

=

255 - Green

Cyan

=

255 - Red

Hue

=

(255/2p) * arctan2 (1/2 Ö3 * (Green-Blue) , Red - (Green+Blue) / 2 ) * 240/255

Saturation

=

Ö (Red2 + Green2 + Blue2 - Red*Green - Red*Blue - Green*Blue) * 240/255

Intensity

=

1/3 * (Red + Green + Blue) * 240/255

Gray

=

0.3 * Red + 0.59 * Green + 0.11 * Blue

Red, Green, and Blue values range from 0 to 255. Hue, Saturation, and Intensity values however range from 0 to 240; this range complies with the Windows color scheme definition. In the formulas for Hue, Saturation and Intensity above, multiplication factor 240/255 is used to obtain that range.

See also: