Color filtering in YCbCr color space.

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


public class YCbCrFiltering : BaseInPlacePartialFilter


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 Hierarchy


See Also