exponential_background — VIDEOSTREAM recursive op

Data kinds: videovideo

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

> The detailed description below is the original text — the summary and the headings are translated.

最初のフレームで `bg を初期化し、以後 bg += α (frame - bg)` を画素ごとに

繰り返す指数移動平均。状態は背景 1 枚だけ(窓を持たない)。フレーム `t` の

出力はその時点の `bg の写しで、t = 0` は入力の先頭フレームそのもの。

• `video: (T, H, W)` 配列か 2-D フレームの list。整数 dtype は最大値で

`[0, 1] に正規化、float は [0, 1] にクリップ。NaN/Inf は ValueError`。

• `alpha: [0, 1]。時定数はおよそ 1/α` フレーム(0.05 → 約 20 枚)。

0 なら背景は先頭フレームのまま固定、1 なら常に現在のフレーム。

**物体が止まると `1/α` 枚ほどで背景に吸収される**(選択的更新は無い)。

• 返り値: `(T, H, W) float64、[0, 1]`。

• 失敗: `ValueError(形・dtype・alpha` の範囲)。

前景マスクまで欲しいなら同じモデルの `exponential_foreground`。画素ごとの

雑音に閾値を合わせたいなら `running_gaussian_background`。

Detailed usage guide

video_streaming family guide

Background guides (the physics and conventions behind this op)

mv_cables — ケーブル(規格・速度・給電・ロボットケーブル)

mv_frame_grabbers — フレームグラバーボード(光学系ではないが、撮れるかを決める)

mv_standards — カメラインターフェースの規格と団体

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_streamingpy -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.