background opvideo → videoimport fullseye as fs; fs.ledger.running_gaussian_background(video, alpha: 'float' = 0.02, k: 'float' = 2.5, var_init: 'float' = 0.01, selective: 'bool' = True) -> 'np.ndarray' (実装を直接呼ぶなら import videostream; videostream.running_gaussian_background(video, alpha: 'float' = 0.02, k: 'float' = 2.5, var_init: 'float' = 0.01, selective: 'bool' = True) -> 'np.ndarray'、台帳から引くなら opsvideostream.get("running_gaussian_background"))Adaptive single-Gaussian background (the running mean) per frame → (T, H, W) (video).
画素ごとに平均 mean と分散 var を持つ単一ガウス背景(Wren の Pfinder)を
回し、各フレーム後の mean を返す。前景判定は
(frame - mean)^2 > k^2 var。selective=True(既定)では前景と判定した画素の
mean / var を更新しないので、ゆっくり動く物体が背景に溶けない。
更新式は mean += α diff、var += α (diff^2 - var)、var の下限は 1e-4。
video: (T, H, W) 配列か 2-D フレームの list。整数は最大値で [0, 1]
に正規化、float はクリップ。NaN/Inf は ValueError。alpha: [0, 1] の学習率。既定 0.02(時定数およそ 50 枚)。k: [0, 100]。前景とみなす標準偏差の倍数。既定 2.5。var_init: [1e-9, 1]。先頭フレームでの分散の初期値([0, 1] 強度の 2 乗)。
小さすぎると 2 枚目から全画素が前景になり、selective で更新が止まる。selective: 前景画素の更新を止めるか。False なら全画素を常に更新。(T, H, W) float64。t = 0 は先頭フレームそのもの。ValueError(形・dtype・各範囲)。同じモデルの前景マスクは running_gaussian_foreground(同じ引数で対にすると
フレームごとに整合する)。
py -3.11 examples/video_streaming.pyvideo を入力に取れる)temporal_median_window · moving_average_window · background_subtraction_window · frame_difference_causal · exponential_background · exponential_foreground · running_mean_std · optical_flow_magnitude_stream
background)Provenance: videostream.py — VIDEOSTREAM operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.