exponential_background — VIDEOSTREAM recursive op

• Data kinds: video → video

• Call: import fullseye as fs; fs.ledger.exponential_background(video, alpha: 'float' = 0.05) -> 'np.ndarray' (to call the implementation directly, import videostream; videostream.exponential_background(video, alpha: 'float' = 0.05) -> 'np.ndarray'; from the registry, opsvideostream.get("exponential_background"))

Usage

Recursive background bg ← (1−α)·bg + α·frame per frame → (T, H, W) (video).

An exponential moving average that initialises bg with the first frame and then repeats bg += α (frame - bg) per pixel. The state is just 1 background (no window). The output for frame t is a copy of bg at that moment, and t = 0 is the first input frame itself.

• video: a (T, H, W) array or a list of 2-D frames. Integer dtypes are normalised to [0, 1] by their maximum, float is clipped to [0, 1]. NaN/Inf gives ValueError.

• alpha: [0, 1]. The time constant is roughly 1/α frames (0.05 → about 20 frames). With 0 the background stays fixed at the first frame, with 1 it is always the current frame. When an object stops, it is absorbed into the background in about 1/α frames (there is no selective update).

• Returns: (T, H, W) float64, [0, 1].

• Failure: ValueError (shape, dtype, range of alpha).

If you also want the foreground mask, exponential_foreground uses the same model. To match the threshold to the per-pixel noise, running_gaussian_background.

Detailed usage guide

• video_streaming family guide

Background guides (the physics and conventions behind this op)

• mv_cables — Cables (standards, speed, power delivery, robot cables)

• mv_frame_grabbers — Frame grabber boards (not optics, but they decide whether you can capture at all)

• mv_standards — Camera interface standards and the bodies behind them

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• video_streaming — py -3.11 examples/video_streaming.py

Ops the type connects to (they accept video as input)

temporal_median_window · moving_average_window · background_subtraction_window · frame_difference_causal · exponential_foreground · running_mean_std · optical_flow_magnitude_stream · motion_history_image

Same category (recursive)

frame_difference_causal · exponential_foreground · running_mean_std


*Provenance: videostream.py — VIDEOSTREAM operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.