C# Class Accord.Imaging.Filters.YCbCrFiltering

Color filtering in YCbCr color space.

The filter operates in YCbCr color space and filters pixels, which color is inside/outside of the specified YCbCr range - it keeps pixels with colors inside/outside of the specified range and fills the rest with specified color.

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

Sample usage:

// create filter YCbCrFiltering filter = new YCbCrFiltering( ); // set color ranges to keep filter.Cb = new Range( -0.2f, 0.0f ); filter.Cr = new Range( 0.26f, 0.5f ); // 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
YCbCrFiltering ( ) : System

Initializes a new instance of the YCbCrFiltering class.

YCbCrFiltering ( Range yRange, Range cbRange, Range crRange ) : System

Initializes a new instance of the YCbCrFiltering class.

Méthodes protégées

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

Process the filter on the specified image.

Method Details

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

YCbCrFiltering() public méthode

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

YCbCrFiltering() public méthode

Initializes a new instance of the YCbCrFiltering class.
public YCbCrFiltering ( Range yRange, Range cbRange, Range crRange ) : System
yRange AForge.Range Range of Y component.
cbRange AForge.Range Range of Cb component.
crRange AForge.Range Range of Cr component.
Résultat System