Grayscale image using Y algorithm.

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

Syntax

C#
public static readonly Grayscale Y

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:

CopyC#
// apply the filter
Bitmap grayImage = Grayscale.CommonAlgorithms.Y.Apply( image );

See Also