Initializes a new instance of the ImageStatisticsYCbCr class.

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

Syntax

C#
public ImageStatisticsYCbCr(
	Bitmap image,
	Bitmap mask
)

Parameters

image
Type: System.Drawing..::.Bitmap
Image to gather statistics about.
mask
Type: System.Drawing..::.Bitmap
Mask image which specifies areas to collect statistics for.

Remarks

The mask image must be a grayscale/binary (8bpp) image of the same size as the specified source image, where black pixels (value 0) correspond to areas which should be excluded from processing. So statistics is calculated only for pixels, which are none black in the mask image.

Exceptions

ExceptionCondition
AForge.Imaging..::.UnsupportedImageFormatExceptionSource pixel format is not supported.
System..::.ArgumentExceptionMask image must be 8 bpp grayscale image.
System..::.ArgumentExceptionMask must have the same size as the source image to get statistics for.

See Also