C# Class Accord.Imaging.Filters.Grayscale.CommonAlgorithms

Set of predefined common grayscaling algorithms, which have already initialized grayscaling coefficients.
Show file Open project: accord-net/framework

Public Properties

Property Type Description
BT709 Grayscale
RMY Grayscale
Y Grayscale

Property Details

BT709 public static property

Grayscale image using BT709 algorithm.

The instance uses BT709 algorithm to convert color image to grayscale. The conversion coefficients are: Red: 0.2125; Green: 0.7154; Blue: 0.0721.

Sample usage:

// apply the filter Bitmap grayImage = Grayscale.CommonAlgorithms.BT709.Apply( image );
public static Grayscale,Accord.Imaging.Filters BT709
return Grayscale

RMY public static property

Grayscale image using R-Y algorithm.

The instance uses R-Y algorithm to convert color image to grayscale. The conversion coefficients are: Red: 0.5; Green: 0.419; Blue: 0.081.

Sample usage:

// apply the filter Bitmap grayImage = Grayscale.CommonAlgorithms.RMY.Apply( image );
public static Grayscale,Accord.Imaging.Filters RMY
return Grayscale

Y public static property

Grayscale image using Y algorithm.

The instance uses Y algorithm to convert color image to grayscale. The conversion coefficients are: Red: 0.299; Green: 0.587; Blue: 0.114.

Sample usage:

// apply the filter Bitmap grayImage = Grayscale.CommonAlgorithms.Y.Apply( image );
public static Grayscale,Accord.Imaging.Filters Y
return Grayscale