Table Of Contents

Histogram (G Dataflow)

Last Modified: June 25, 2019

Calculates the histogram of an image.

connector_pane_image
datatype_icon

image in

Reference to the source image.

datatype_icon

image mask

8-bit image specifying the region in the image to use for the calculation.

Only those pixels in the original image that correspond to an equivalent non-zero pixel in the mask image are used for the calculation. The entire image is used in the calculation if image mask is not connected.

datatype_icon

number of classes

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. 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 designed for 8-bit images. This value gives a uniform class distribution or one class for each grayscale intensity in an 8-bit image.

Default: 256

datatype_icon

interval range

Cluster specifying the minimum and maximum boundaries for the histogram calculation.

Only those pixels having a value that falls in this range are taken into account by the histogram calculation.

datatype_icon

minimum

Minimum interval value.

The default value of (0, 0) ensures that the real minimum value is determined by the source image, as described in the following table.

Image Type Minimum Value Used
U8 0
I16 Minimum pixel value found in the image
SGL Minimum pixel value found in the image

Default: (0, 0)

datatype_icon

maximum

Maximum interval value.

The default value of (0, 0) ensures that the real maximum value is determined by the source image, as described in the following table.

Image Type Minimum Value Used
U8 0
I16 Maximum pixel value found in the image
SGL Maximum pixel value found in the image

Default: (0, 0)

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

image out

Reference to the source image.

datatype_icon

histogram report

Cluster that returns the histogram values.

datatype_icon

histogram

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))].

datatype_icon

minimal value

Smallest pixel value used in calculating the histogram.

datatype_icon

maximal value

Largest pixel value used in calculating the histogram.

datatype_icon

starting value

Smallest pixel value from the first class calculated in the histogram.

starting value can be equal to the minimum value from the interval range or the smallest value found for the image type connected.

datatype_icon

interval width

Length of each class.

datatype_icon

mean value

Mean value of the pixels used in calculating the histogram.

datatype_icon

standard variation

Standard deviation from the histogram.

A higher value corresponds to a better distribution of the values in the histogram and the image.

datatype_icon

area (pixels)

Number of pixels used in the histogram calculation.

This is influenced by the values specified in interval range and the contents of image mask.

datatype_icon

histogram graph

Cluster that returns the histogram values.

datatype_icon

starting value

Smallest pixel value from the first class calculated in the histogram.

starting value can be equal to the minimum value from the interval range or the smallest value found for the image type connected.

datatype_icon

Incremental Value

Value that specifies how much to add to starting value in calculating the median value of each class from the histogram.

The median value x n from the nth class is expressed as follows: x n = Starting Value + n × Incremental Value.

datatype_icon

Histogram

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))].

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics