Video Detection Histogram

Measures how the levels of the video are spread, on the luma or on the red, green or blue channel: a histogram of 8 to 256 classes as an array, with the mean, median, minimum, maximum, standard deviation, clipped blacks and whites, the share above a threshold and the automatic threshold of Otsu. Use it to watch the exposure of a camera, to set the thresholds of the detection modules from the real light of the room, or to drive visuals and lights from the tonal balance of the picture.

A video, its luma histogram (64 classes, normalize peak) in an Array Display, and six of the statistics.

The module has no video output: show histogram with an Array Display. Every statistic is computed on the 256 levels of the chosen channel, whatever the number of classes. Without an input, the outputs keep their last values. A frame costs about 0.6 ms at 1920 x 1080 and 1.2 ms at 3840 x 2160 (precision auto).

Settings

video in

Video input flow(s).

process time

Total time used for the calculation of the module.

channel

Channel measured (default luma).

  • luma: the brightness, 0.30 R + 0.59 G + 0.11 B.
  • red: the red channel.
  • green: the green channel.
  • blue: the blue channel.

bins

Number of classes of the histogram array: 8, 16, 32, 64, 128 or 256 (default 64). The classes have equal widths: with 64 classes, the first one holds the levels 0 to 3 of 255, the second one the levels 4 to 7, and so on.

normalize

Scale of the histogram array (default sum).

  • sum: each class is its share of the pixels measured, and the array sums to 1.
  • peak: each class is divided by the largest one, which gives 1: the best scale for a display.

precision

Share of the pixels measured (default auto). Measuring fewer pixels costs less and changes the statistics only in the third decimal.

  • auto: every pixel up to 600,000 pixels, 1 pixel of 4 at 1280 x 720 and 1920 x 1080, 1 pixel of 16 at 3840 x 2160.
  • every pixel: every pixel, the most exact and the slowest.
  • 1 pixel of 4: one pixel in 4.
  • 1 pixel of 16: one pixel in 16.

threshold

Level used by above threshold, from 0 to 1 (default 0.5).

clip margin

Width of the ranges counted by black clip and white clip, from 0 to 32 levels of 255 (default 1): black clip counts the levels from 0 to the margin, white clip the levels from 255 minus the margin to 255.

smooth

Smoothing of every output from frame to frame, from 0 to 0.99 (default 0: none). At each frame the outputs move by 1 - smooth of the way to the new values: at 0.9, a tenth of the way. A change of channel, bins or normalize starts again without smoothing.

histogram

Array of bins classes, from 0 to 1, from the darkest levels (first entry) to the brightest (last entry), scaled as set by normalize.

input = gray $FF808080 (level 128 of 255)
bins = 64, normalize = sum
histogram = 1 at index 32, 0 elsewhere
mean = median = min = max = otsu threshold = 0.502
std dev = 0, black clip = 0, white clip = 0

mean

Mean level, from 0 to 1.

median

Median level, from 0 to 1: half of the pixels are at this level or below.

min

Lowest level present, from 0 to 1.

max

Highest level present, from 0 to 1.

std dev

Standard deviation of the levels, from 0 to 0.5: 0 on a plain color, about 0.22 on the color bars, higher on a picture split between dark and bright areas.

black clip

Share of the pixels at a level from 0 to clip margin, from 0 to 1: the crushed blacks.

white clip

Share of the pixels at a level from 255 minus clip margin to 255, from 0 to 1: the burnt whites.

above threshold

Share of the pixels whose level is above threshold, from 0 to 1. A gray of level 128 gives 0 at threshold 0.5 (level 128) and 1 at threshold 0.49.

otsu threshold

Automatic threshold of Otsu, from 0 to 1: the level that splits the pixels most clearly into a dark group and a bright group (the largest variance between the two groups). Wire it into the threshold of Video Detection Blob to follow the light of the room. A picture of a single level gives that level.

Common Settings

info

show manual

Button. Opens the manual page of the selected object (or of its parent module for a control) in the web browser. If no page exists for this object, an error is traced in the trace panel.

For more details about information/help creation, see create-help-file.

description

Free multi-line text attached to the module, saved with the patch. When it is not empty, it is shown as the hint of the module (mouse over the module header in the patch) in place of the default module hint, even when the module hints are disabled.

ID's

visible only in god mode, see setup-panel-tab-expert.

unique ID

Read-only, not saved. Current private numeric ID of the object, used internally to identify it (for example as the target of a bind ID).

preset ID

Read-only, not saved. Private ID used to store and recall the values of this control in presets.

recreate ID

Button. Generates a new unique ID, original ID and preset ID for the object. Use it if you experience difficulties in Polyphonic mode or if two objects share the same ID. Preset values and binds referring to the old IDs are lost.

Object Remote Address

absolute

Read-only, not saved. Absolute address of the object in the Usine objects tree, built from the workspace root. This is the address to use to reach the object from scripts, the objects panel or remote messages. Only shown for objects that are registered in the objects list. See objects-address.

local

Read-only, not saved. Address of the object relative to the current patch, valid inside that patch only. See objects-address.

user addr

Free user-defined address for the object (empty by default). When set, the object is also registered in the objects tree under this name, so it can be reached independently of its position in the workspace (the value is also reported in the mouse-over and mouse-down chunks). Changing it rebuilds the objects list. Only available on objects that support a user address. See objects-address.

See also

version 7.0.250921

Edit All Pages