Click or drag to resize
Accord.NET (logo)

GrayscaleCommonAlgorithmsY Field

Grayscale image using Y algorithm.

Namespace:  Accord.Imaging.Filters
Assembly:  Accord.Imaging (in Accord.Imaging.dll) Version: 3.8.0
Syntax
public static readonly Grayscale Y
Request Example View Source

Field Value

Type: Grayscale
Remarks

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 );
See Also