C# Class AForge.Imaging.VerticalIntensityStatistics

Vertical intensity statistics.

The class provides information about vertical 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.

Sample usage:

// collect statistics VerticalIntensityStatistics vis = new VerticalIntensityStatistics( sourceImage ); // get gray histogram (for grayscale image) Histogram histogram = vis.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 vertical intensity histogram:

Mostrar archivo Open project: holisticware-admin/MonoVersal.AForgeNET Class Usage Examples

Public Methods

Method Description
VerticalIntensityStatistics ( Bitmap image ) : System

Initializes a new instance of the VerticalIntensityStatistics class.

VerticalIntensityStatistics ( BitmapData imageData ) : System

Initializes a new instance of the VerticalIntensityStatistics class.

VerticalIntensityStatistics ( UnmanagedImage image ) : System

Initializes a new instance of the HorizontalIntensityStatistics class.

Private Methods

Method Description
ProcessImage ( UnmanagedImage image ) : void

Gather vertical intensity statistics for specified image.

Method Details

VerticalIntensityStatistics() public method

Initializes a new instance of the VerticalIntensityStatistics class.
Unsupported pixel format of the source image.
public VerticalIntensityStatistics ( Bitmap image ) : System
image System.Drawing.Bitmap Source image.
return System

VerticalIntensityStatistics() public method

Initializes a new instance of the VerticalIntensityStatistics class.
Unsupported pixel format of the source image.
public VerticalIntensityStatistics ( BitmapData imageData ) : System
imageData System.Drawing.Imaging.BitmapData Source image data.
return System

VerticalIntensityStatistics() public method

Initializes a new instance of the HorizontalIntensityStatistics class.
Unsupported pixel format of the source image.
public VerticalIntensityStatistics ( UnmanagedImage image ) : System
image UnmanagedImage Source unmanaged image.
return System