Operator Histogram

Operator Library: Accumulator

This operator calculates an intensity histogram from the input image at I and outputs the results at output O. Depending on the option of the AutoSync parameter, the histogram is computed for each line or for each frame. The output is not a visualization of the results, but a list of the histogram values.

  • AutoSync = EoF produces a histogram image of height 1 for the entire frame.
  • AutoSync = EoL produces a histogram image of the input image height, i.e. a histogram is computed for each input image line separately.

The histogram itself consists of 2^(InputBitWidth) elements. Each element is the number of pixels for each tonal value. The first pixel at the histogram output is the number of pixels with tonal value zero.

The Histogram operator uses internal memory to store intermediate histogram results. Whenever the operator is busy, the input is blocked to prevent new data from arriving. The following cases cause the input to be blocked:

  • Processing of an input frame or input line: While an input frame or input line is being processed, the operator stores the intermediate histogram results in its internal memory. When an input frame (AutoSync = EoF) or input line (AutoSync = EoL) is complete, the internal memory is read to obtain the resulting histogram data. During the read-out phase, the input is blocked. As a result, small input images and a line-based histogram output (AutoSync = EoL) significantly reduce the input bandwidth.

  • Initialization after system start-up or reset: At system start-up or after a reset, the internal memory is initialized with zeroes. During this initialization process, the operator is busy and the input is blocked to ensure that no new data is received.

I/O Properties

Property Value
Operator Type M
Input Link I, Image Input
Output Link O, Data Output

Supported Link Format

Link Parameter Input Link I Output Link O
Bit Width [1, 16] auto1
Arithmetic unsigned as I
Parallelism any as I
Kernel Columns 1 as I
Kernel Rows 1 as I
Img Protocol VALT_IMAGE2D as I
Color Format VAF_GRAY as I
Color Flavor FL_NONE as I
Max. Img Width any auto2
Max. Img Height any auto3

1

The output bit width depends on the max image dimension link properties and the setting of parameter AutoSync.

For AutoSync = EoF the output bit width is

For AutoSync = EoL the output bit width is

The output bit width must not exceed 64 Bit.

2

The output image width is determined by the input bit width. Each possible pixel value of the input image is represented by the pixels of the output image.

3

For parameter AutoSync = EoF, the output image height is one. For parameter AutoSync = EoL, the output image height is equal to the input image height.

Parameters

AutoSync
Type static parameter
Default EoL
Range {EoL, EoF}

This parameter selects whether to output a histogram every line (setting EoL) or every frame (setting EoF). Note the parameter's influence on the output bit width. The output bit width must not exceed 64 Bit.

Examples of Use

The use of operator Histogram is shown in the following examples: