C# Class Accord.Imaging.Filters.ColorFiltering

Color filtering.

The filter filters pixels inside/outside of specified RGB color range - it keeps pixels with colors inside/outside of specified range and fills the rest with specified color.

The filter accepts 24 and 32 bpp color images for processing.

Sample usage:

// create filter ColorFiltering filter = new ColorFiltering( ); // set color ranges to keep filter.Red = new IntRange( 100, 255 ); filter.Green = new IntRange( 0, 75 ); filter.Blue = new IntRange( 0, 75 ); // apply the filter filter.ApplyInPlace( image );

Initial image:

Result image:

Inheritance: BaseInPlacePartialFilter
Afficher le fichier Open project: accord-net/framework Class Usage Examples

Méthodes publiques

Méthode Description
ColorFiltering ( ) : System

Initializes a new instance of the ColorFiltering class.

ColorFiltering ( IntRange red, IntRange green, IntRange blue ) : System

Initializes a new instance of the ColorFiltering class.

Méthodes protégées

Méthode Description
ProcessFilter ( UnmanagedImage image, Rectangle rect ) : void

Process the filter on the specified image.

Method Details

ColorFiltering() public méthode

Initializes a new instance of the ColorFiltering class.
public ColorFiltering ( ) : System
Résultat System

ColorFiltering() public méthode

Initializes a new instance of the ColorFiltering class.
public ColorFiltering ( IntRange red, IntRange green, IntRange blue ) : System
red AForge.IntRange Red components filtering range.
green AForge.IntRange Green components filtering range.
blue AForge.IntRange Blue components filtering range.
Résultat System

ProcessFilter() protected méthode

Process the filter on the specified image.
protected ProcessFilter ( UnmanagedImage image, Rectangle rect ) : void
image UnmanagedImage Source image data.
rect System.Drawing.Rectangle Image rectangle for processing by the filter.
Résultat void