background_subtraction_window — VIDEOSTREAM window op

데이터 종류: videovideo

호출: import fullseye as fs; fs.ledger.background_subtraction_window(video, window: 'int' = 5, threshold: 'float' = 0.1) -> 'np.ndarray'(구현을 직접 호출하려면 import videostream; videostream.background_subtraction_window(video, window: 'int' = 5, threshold: 'float' = 0.1) -> 'np.ndarray', 원장에서 가져오려면 opsvideostream.get("background_subtraction_window"))

사용법

인과적 윈도 중앙값 배경 → 프레임별 0/1 전경 마스크 `(T, H, W)(video`).

> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.

フレーム `t ごとに、直近 window 枚(max(0, t-window+1) .. t`、**そのフレーム

自身を含む**)の画素ごとの中央値を背景 `bg とし、|frame_t - bg| > threshold`

を 1、それ以外を 0 にする。未来のフレームは見ない(因果的)ので、先頭では

枚数が足りないぶん窓が短い。

• `video: (T, H, W)` の配列、または同形・同 dtype の 2-D フレームの list。

uint8/uint16 は dtype の最大値で `[0, 1] に、float はそのまま [0, 1]` に

クリップ。カラー `(T, H, W, C) は受けない。NaN/Inf は ValueError`。

• `window`: 1〜4096 の int(bool 不可)。1 だと背景 = 自分なので全画素 0。

偶数枚のときの中央値は中間 2 値の平均。

• `threshold: [0, 1] の強度単位(uint8 なら /255` 換算)。

• 返り値: `(T, H, W)` float64 の 0 / 1。

• 失敗: `ValueError`(形・dtype・範囲・非有限)。

ゆっくり動く物体は `window` 枚以内に背景へ溶けるので、その場合は

`running_gaussian_foreground(選択的更新)か exponential_foreground` を。

背景そのものが要るなら `temporal_median_window`。

자세한 사용 가이드

video_streaming 패밀리 가이드

배경 지식 가이드(이 연산자 앞에 있는 물리·규약)

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

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

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

참고(샘플 데이터·문헌)

• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.

• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.

• 알고리즘의 정전(저자·연도)과 용도는 위의 패밀리 사용 가이드에 적혀 있습니다.

실행 가능한 예제(이 연산자를 실제로 호출하는 검증된 샘플)

video_streamingpy -3.11 examples/video_streaming.py

타입이 이어지는 다음 연산자(video 를 입력으로 받는 것)

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

같은 카테고리(window)

temporal_median_window · moving_average_window


*Provenance: videostream.py — VIDEOSTREAM 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*

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