exponential_foreground — VIDEOSTREAM recursive op

• 資料種類:video → video

• 呼叫: import fullseye as fs; fs.ledger.exponential_foreground(video, alpha: 'float' = 0.05, threshold: 'float' = 0.1) -> 'np.ndarray'(要直接呼叫實作,import videostream; videostream.exponential_foreground(video, alpha: 'float' = 0.05, threshold: 'float' = 0.1) -> 'np.ndarray';從台帳取用則 opsvideostream.get("exponential_foreground"))

用法

前景遮罩 |frame − 指數背景| > threshold → 0/1 (T, H, W)(video)。

執行與 exponential_background 相同的指數移動平均 bg += α (frame - bg), 在每一幀把與更新後的 bg 之差 |frame - bg| > threshold 設為 1。第一幀用於初始化 bg,差為 0,因此 t = 0 全部像素為 0。

• video: (T, H, W) 陣列或 2-D 幀的 list。整數 dtype 依最大值正規化到 [0, 1],float 做截斷。NaN/Inf 拋出 ValueError。

• alpha: [0, 1]。越大背景跟隨越快,停下的物體約 1/α 幀後消失。為 1 時 bg == frame,始終全部像素為 0。

• threshold: [0, 1] 的強度單位。是所有像素共用的絕對閾值,因此暗部的雜訊與亮部的雜訊用同一閾值切分。

• 回傳值: (T, H, W) float64 的 0 / 1。

• 失敗: ValueError。

若想依逐像素變異數決定閾值,用 running_gaussian_foreground。若要無鬼影的動態偵測,用 three_frame_difference。

詳細使用指南

• video_streaming 族使用指南

背景知識指南(該運算子背後的物理與規範)

• mv_cables — 線纜(規格、速度、供電、機器人線纜)

• mv_frame_grabbers — 影像擷取卡(不屬於光學系統,卻決定能否擷取到影像)

• mv_standards — 相機介面規格與標準組織

參考(範例資料、文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

• 演算法的正典(作者、年份)與用途見上面的族使用指南。

可執行的範例(實際呼叫該運算子並已驗證的樣例)

• video_streaming — py -3.11 examples/video_streaming.py

型別可銜接的下一個運算子(可接受 video 作為輸入)

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

同類別(recursive)

frame_difference_causal · exponential_background · running_mean_std


*Provenance: videostream.py — VIDEOSTREAM 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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