Initializes a new instance of the ImageStatistics class.
Namespace:
AForge.ImagingAssembly: AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)
Syntax
Parameters
- image
- Type: System.Drawing..::.Bitmap
Image to gather statistics about.
- mask
- Type: array<
System..::.Byte
,2>[,](,)[,]
Mask array which specifies areas to collect statistics for.
Remarks
The mask array must be of the same size as the specified source image, where 0 values correspond to areas which should be excluded from processing. So statistics is calculated only for pixels, which have none zero corresponding value in the mask.
Exceptions
Exception | Condition |
---|---|
AForge.Imaging..::.UnsupportedImageFormatException | Source pixel format is not supported. |
System..::.ArgumentException | Mask must have the same size as the source image to get statistics for. |