C# Class AForge.Imaging.Filters.ExtractNormalizedRGBChannel

Extract normalized RGB channel from color image.

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

Normalized RGB color space is defined as: 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:

// create filter ExtractNormalizedRGBChannel filter = new ExtractNormalizedRGBChannel( RGB.G ); // apply the filter Bitmap channelImage = filter.Apply( image );
Inheritance: BaseFilter
Show file Open project: holisticware-admin/MonoVersal.AForgeNET

Public Methods

Method Description
ExtractNormalizedRGBChannel ( ) : System

Initializes a new instance of the ExtractNormalizedRGBChannel class.

ExtractNormalizedRGBChannel ( short channel ) : System

Initializes a new instance of the ExtractNormalizedRGBChannel class.

Protected Methods

Method Description
ProcessFilter ( UnmanagedImage sourceData, UnmanagedImage destinationData ) : void

Process the filter on the specified image.

Method Details

ExtractNormalizedRGBChannel() public method

Initializes a new instance of the ExtractNormalizedRGBChannel class.
public ExtractNormalizedRGBChannel ( ) : System
return System

ExtractNormalizedRGBChannel() public method

Initializes a new instance of the ExtractNormalizedRGBChannel class.
public ExtractNormalizedRGBChannel ( short channel ) : System
channel short Normalized RGB channel to extract.
return System

ProcessFilter() protected method

Process the filter on the specified image.
protected ProcessFilter ( UnmanagedImage sourceData, UnmanagedImage destinationData ) : void
sourceData UnmanagedImage Source image data.
destinationData UnmanagedImage Destination image data.
return void