Extract normalized RGB channel from color image.

Namespace:  AForge.Imaging.Filters
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public class ExtractNormalizedRGBChannel : BaseFilter

Remarks

Extracts specified normalized RGB channel of color image and returns it as grayscale image.

Note:Normalized RGB color space is defined as:
Copy 
r = R / (R + G + B ),
g = G / (R + G + B ),
b = B / (R + G + B ),
where R, G and B are components of RGB color space and r, g and b are components of normalized RGB color space.

The filter accepts 24, 32, 48 and 64 bpp color images and produces 8 (if source is 24 or 32 bpp image) or 16 (if source is 48 or 64 bpp image) bpp grayscale image.

Sample usage:

CopyC#
// create filter
ExtractNormalizedRGBChannel filter = new ExtractNormalizedRGBChannel( RGB.G );
// apply the filter
Bitmap channelImage = filter.Apply( image );

Inheritance Hierarchy

System..::.Object
  AForge.Imaging.Filters..::.BaseFilter
    AForge.Imaging.Filters..::.ExtractNormalizedRGBChannel

See Also