Histogram

Histogram

Analyses the colour and brightness distribution of the image and reports whether enough pixels fall inside a chosen colour range. Useful for monitoring exposure on a live feed, detecting when a known team colour or sponsor branding appears on screen, triggering automation when a colour signal (a flag, a light, a vest) is shown to the camera, or recording the dominant hue/saturation of footage for editorial purposes. Define a hue/saturation/value window, set how much of the area must qualify, and use the Qualified flags to drive scripts.

Histogram - Settings

Configuration

Configuration — define which colours and brightnesses count as qualifying pixels.

Configuration
Property Description
Minimum hue value Lowest hue (in degrees) that counts as a qualifying colour. [min=0, max=360, default=0]. Hue runs around the colour wheel: 0=red, 60=yellow, 120=green, 180=cyan, 240=blue, 300=magenta. Combine with ConfigurationHueValueMax to pick a slice of the wheel.
Maximum hue value Highest hue (in degrees) that counts as a qualifying colour. [min=0, max=360, default=360]. Set the same as ConfigurationHueValueMin for an exact hue match, or widen the range to accept variations.
Minimum saturation Minimum colour saturation (%). [min=0, max=100, default=20]. Pixels less saturated than this are ignored. Raise this to exclude near-grey pixels and only react to vivid colours.
Maximum saturation Maximum colour saturation (%). [min=0, max=100, default=0]. 0 disables the upper limit. Use to exclude over-saturated pixels.
Minimum value Minimum brightness (value, %) of qualifying pixels. [min=0, max=100, default=10]. Pixels darker than this are ignored. Raise this to exclude shadows and only react to well-lit colour.
Minimum detect percentage Percentage of the area that must qualify before Qualified becomes true. [min=0, max=100, default=0]. 0 means any single matching pixel qualifies the frame. Raise this to ignore tiny patches and only fire on substantial coverage (for example, a flag filling a sizeable part of the frame).

Visualization

Visualization — control how qualifying and non-qualifying pixels appear in the output image.

Visualization
Property Description
Show qualifying pixels Tint qualifying pixels in the output so they stand out. [default=false]. Useful while dialing in the colour range. Turn off in production unless the visualisation is part of the show.
Hide disqualifying pixels Hide pixels that do not qualify, leaving only the matching colour visible. [default=false]. Combine with Show qualifying pixels for a clear "matched-only" look.
Hide all output Hide all visual output and use the operator only as a measurement. [default=false]. The Qualified properties are still updated. Use this when the histogram is just a trigger and shouldn't change the picture.

Temporal filter (time)

Temporal filter — require qualification across several frames to avoid flicker.

Temporal filter (time)
Property Description
Consecutive Qualify Frames Number of consecutive frames the colour must qualify before TemporalQualified becomes true. [min=1, max=30, default=1]. Higher values smooth out single-frame glitches but delay the trigger. 1 means react immediately.
Consecutive Un-qualify Frames Number of consecutive frames without a match before TemporalQualified resets to false. [min=1, max=30, default=1]. Higher values keep the trigger high through brief drop-outs.

Results

Results — read-only outputs reporting what was found in the most recent frame.

Results
Property Description
Qualified True when the current frame matches the configured colour (read-only). Reflects the raw, instantaneous match. Use TemporalQualified for a debounced version.
Temporal Qualified True after enough consecutive frames have qualified (read-only). The recommended trigger for scripts — debounced via ConfigurationMinFramesToQualify/ConfigurationMinFramesToNotQualify.
Most common hue Hue (degrees) that appears most often in the analysed area (read-only).
Count How many pixels share the most common hue (read-only).
Number of hue values Number of distinct hue values present (read-only). A low number suggests a flat colour palette; a high number suggests a busy/varied image.
Most common saturation Saturation level that appears most often, 0–255 (read-only).
Number of saturation values Number of distinct saturation values present (read-only).

Summary

Summary — overall pixel counts for the analysed area.

Summary
Property Description
Total number of pixels analyzed Total number of pixels considered, before colour filtering (read-only).
Total number of pixels processed Number of pixels that matched the configured colour rules (read-only).
Percent processed Matching pixels as a percentage of the analysed area, formatted as text (read-only).

Processing area

Processing area — choose which part of the image is analysed.

Processing area
Property Description
Video pass-through Output the original picture untouched while still analysing it. [default=false]. Useful when the histogram is purely a measurement and the visualization options would interfere with the show.
Left Pixels to ignore from the left of the image. [min=0, max=4096, default=0]. Use to limit analysis to a region of interest, for example excluding lower-thirds, scoreboards or letterbox bars.
Right Pixels to ignore from the right of the image. [min=0, max=4096, default=0].
Top Pixels to ignore from the top of the image. [min=0, max=4096, default=0].
Bottom Pixels to ignore from the bottom of the image. [min=0, max=4096, default=0].

Inherits from: AbstractOperator, AbstractAudioMetering.

See also: Histogram in Script Engine Objects.