Histograph

Description

Calculates the histogram from an image. Type : polymorphic.

 

Documentation illustration (illustration unavailable in the archive).

Input parameters

 

Documentation illustration (illustration unavailable in the archive). Image Src : class, type accepted U8 and I16.
Documentation illustration (illustration unavailable in the archive). Image Mask : class, type accepted U8 and I16.

Documentation illustration (illustration unavailable in the archive). Histogram Parameters : cluster,

Documentation illustration (illustration unavailable in the archive). Number Of Class : integer, specifies the number of classes used to classify the pixels. The number of obtained classes differs from the specified amount in a case in which the minimum and maximum boundaries are overshot in the interval range. It is advised to specify a number of classes that is a power of two (for example, 2, 4, or 8) for 8-bit or 16-bit images. The default value is 256, which is designed for 8-bit images. This value gives a uniform class distribution or one class for each grayscale intensity in an 8-bit image.
Documentation illustration (illustration unavailable in the archive). Minimum Value : float, minimum interval value.
Documentation illustration (illustration unavailable in the archive). Maximum Value : float, maximum interval value.

Documentation illustration (illustration unavailable in the archive).

Output parameters

 

Documentation illustration (illustration unavailable in the archive). Histogram Graph : cluster, returns the histogram values.

Documentation illustration (illustration unavailable in the archive). Starting Value : float, returns the smallest pixel value from the first class calculated in the histogram. It can be equal to the Minimum value from the interval range or the smallest value found for the image type connected.
Documentation illustration (illustration unavailable in the archive).
Increment Value : float,
returns the incrementing value that specifies how much to add to Starting Value in calculating the median value of each class from the histogram. The median value xn from the nth class is expressed as follows : xn = Starting Value + n × Incremental Value.
Documentation illustration (illustration unavailable in the archive).
Histogram : array,
returns the histogram values in an array. The elements found in this array are the number of pixels per class. The nth class contains all pixel values belonging to the interval [(Starting Value + (n – 1) × Interval Width), (Starting Value + n × (Interval Width – 1))].

Documentation illustration (illustration unavailable in the archive). Mean Value : float, returns the mean value of the pixels used in calculating the histogram.
Documentation illustration (illustration unavailable in the archive). Std Dev : float, returns the standard deviation from the histogram. The higher this value, the better the distribution of the values in the histogram and the image.

Documentation illustration (illustration unavailable in the archive).

Examples

All these examples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Computer Vision ​library to run it).