This class represents bitmap histogram.
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
<DefaultMemberAttribute("Item")> _ Public Class Histogram _ Inherits LockableObject _ Implements ICloneable, IEnumerable
[DefaultMemberAttribute("Item")] public class Histogram : LockableObject, ICloneable, IEnumerable
Histograms are widely used in imaging. It is represented as an array which has as much items as intensity levels are supported by bitmap (i.e. for 8 bit per channel bitmaps it will be 256, for 16 bit per channel - 65356). Each histogram entry stores a number of bitmap pixels which have the same intensity level as index of this entry. For example, first histogram entry contains number of black pixels (i.e. pixels having zero intensity level). Entry at index 192 contains number of pixels with intensity level equal to 192.
When Graphics Mill for .NET builds a histogram for grayscale bitmap, it uses pixel value as an intensity level. For color bitmaps (RGB, CMYK) several algorithms for calculating intensity level of each pixel are available. Graphics Mill for .NET implements two of them:
Histogram enables you to estimate image contrast programmatically. Also you can get some other characteristics (mean brightness, standard deviation, median, etc).
Histogram is used (explicitly or implicitly) in number of Graphics Mill for .NET transforms, such as HistogramEqualize, Levels, BrightnessContrast (in automatic mode), etc.
Dim histogram As Aurigma.GraphicsMill.Histogram = _ bitmap.Statistics.GetSumHistogram(False) For i As Integer = 0 To histogram.Length - 1 Console.WriteLine(i & ": " & histogram(i)) Next
Aurigma.GraphicsMill.Histogram histogram = bitmap.Statistics.GetSumHistogram(false); for (int i = 0; i < histogram.Length; i++) { Console.WriteLine(i + ": " + histogram[i]); }