AForge.Imaging.ImageStatisticsYCbCr.ImageStatisticsYCbCr C# (CSharp) Method

ImageStatisticsYCbCr() public method

Initializes a new instance of the ImageStatisticsYCbCr class.

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.

Source pixel format is not supported. Mask image must be 8 bpp grayscale image. Mask must have the same size as the source image to get statistics for.
public ImageStatisticsYCbCr ( UnmanagedImage image, UnmanagedImage mask ) : System
image UnmanagedImage Image to gather statistics about.
mask UnmanagedImage Mask image which specifies areas to collect statistics for.
return System
        public ImageStatisticsYCbCr( UnmanagedImage image, UnmanagedImage mask )
        {
            CheckSourceFormat( image.PixelFormat );
            CheckMaskProperties( mask.PixelFormat, new Size( mask.Width, mask.Height ), new Size( image.Width, image.Height ) );

            unsafe
            {
                ProcessImage( image, (byte*) mask.ImageData.ToPointer( ), mask.Stride );
            }
        }

Same methods

ImageStatisticsYCbCr::ImageStatisticsYCbCr ( Bitmap image ) : System
ImageStatisticsYCbCr::ImageStatisticsYCbCr ( Bitmap image, Bitmap mask ) : System
ImageStatisticsYCbCr::ImageStatisticsYCbCr ( Bitmap image, byte mask ) : System
ImageStatisticsYCbCr::ImageStatisticsYCbCr ( UnmanagedImage image ) : System
ImageStatisticsYCbCr::ImageStatisticsYCbCr ( UnmanagedImage image, byte mask ) : System