C# Класс 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:

Наследование: BaseInPlacePartialFilter
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
ProcessFilter ( UnmanagedImage image, Rectangle rect ) : void

Process the filter on the specified image.

Описание методов

ProcessFilter() защищенный Метод

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.
Результат void

YCbCrFiltering() публичный Метод

Initializes a new instance of the YCbCrFiltering class.
public YCbCrFiltering ( ) : System
Результат System

YCbCrFiltering() публичный Метод

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.
Результат System