Assembly: AForge.Imaging (in AForge.Imaging.dll) Version: 22.214.171.124 (126.96.36.199)
public class HorizontalIntensityStatistics
The class provides information about horizontal distribution of pixel intensities, which may be used to locate objects, their centers, etc.
The class accepts grayscale (8 bpp indexed and 16 bpp) and color (24, 32, 48 and 64 bpp) images. In the case of 32 and 64 bpp color images, the alpha channel is not processed - statistics is not gathered for this channel.
// collect statistics HorizontalIntensityStatistics his = new HorizontalIntensityStatistics( sourceImage ); // get gray histogram (for grayscale image) Histogram histogram = his.Gray; // output some histogram's information System.Diagnostics.Debug.WriteLine( "Mean = " + histogram.Mean ); System.Diagnostics.Debug.WriteLine( "Min = " + histogram.Min ); System.Diagnostics.Debug.WriteLine( "Max = " + histogram.Max );
Sample grayscale image with its horizontal intensity histogram: