Color filtering in YCbCr color space.
Namespace:
AForge.Imaging.FiltersAssembly: AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.3.0 (2.2.3.0)
Syntax
| C# |
|---|
public class YCbCrFiltering : BaseInPlacePartialFilter |
Remarks
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
System..::.Object
AForge.Imaging.Filters..::.BaseInPlacePartialFilter
AForge.Imaging.Filters..::.YCbCrFiltering
AForge.Imaging.Filters..::.BaseInPlacePartialFilter
AForge.Imaging.Filters..::.YCbCrFiltering