tb_background_subtraction_window — 2D typed op

• Data kinds: video → video

• Call: fullseye.apply(img, "tb_background_subtraction_window", a=0.5, b=0.5) (2-D model = एक image + दो scalar knobs a,b∈[0,1])

tb_background_subtraction_window: input → output

*Figure synthetic 128×128 input पर सच में चलाकर मिला output है। बाईं ओर input, दाईं ओर output। Point clouds ऊपर से देखे गए scatter के रूप में (brightness = z), 1-D series line के रूप में, volumes z दिशा में maximum-intensity projection के रूप में, videos बीच के frame के रूप में, complex images amplitude के रूप में, और जो return values चित्र नहीं बन सकते वे स्वयं values के रूप में दिखाए जाते हैं।*

Knob a को बदलकर (0.1 / 0.5 / 0.9, दूसरा knob default पर):

▸ tb_background_subtraction_window: knob a को बदलने का figure (docs site)

Knob b को बदलकर (0.1 / 0.5 / 0.9, दूसरा knob default पर):

▸ tb_background_subtraction_window: knob b को बदलने का figure (docs site)

Stages (पहले आने वाले ops → यह op, बाएँ से क्रम में):

▸ tb_background_subtraction_window: stages का figure (docs site)

दूसरी images पर भी (synthetic scene / photo / coins। ऊपर की row में inputs, नीचे की row में उनके outputs। Knobs default पर):

▸ tb_background_subtraction_window: दूसरी images पर output (docs site)

Motion (GIF: frames / views / slices क्रम से। स्थिर figure ही पूरा रूप है, GIF सहायक है):

tb_background_subtraction_window: animation

उपयोग

causal window-median background → हर frame के 0/1 foreground masks (T, H, W) (video)।

हर frame t के लिए, सबसे हाल के window frame (max(0, t-window+1) .. t, उस frame को भी शामिल करते हुए) का pixel-wise median background bg माना जाता है, और |frame_t - bg| > threshold को 1 तथा बाकी को 0 किया जाता है। भविष्य के frame नहीं देखे जाते (causal), इसलिए शुरुआत में frame की कमी जितनी window छोटी होती है।

• video: (T, H, W) array, या समान shape और समान dtype वाले 2-D frame की list। uint8/uint16 को dtype के अधिकतम मान से [0, 1] में, और float को सीधे [0, 1] में clip किया जाता है। colour (T, H, W, C) स्वीकार नहीं। NaN/Inf पर ValueError।

• window: 1〜4096 का int (bool नहीं)। 1 पर background = स्वयं, इसलिए सभी pixel 0। सम संख्या के frame पर median बीच के 2 मानों का औसत है।

• threshold: [0, 1] की intensity unit (uint8 में /255 से बदलकर)।

• return value: (T, H, W) float64 का 0 / 1।

• विफलता: ValueError (shape, dtype, range, non-finite)।

धीरे चलने वाली वस्तुएँ window frame के भीतर background में घुल जाती हैं, ऐसे में running_gaussian_foreground (selective update) या exponential_foreground का उपयोग करें। background ही चाहिए तो temporal_median_window।

2-D evolution registry में bridge किया गया videostream का op background_subtraction_window। implementation वही है; केवल calling convention को op(v, a, b) के अनुरूप किया गया है। a से window (default 5) और b से threshold (default 0.1) बदला जाता है।

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

Studio में आज़माएँ

नीचे का program सच में चलता है, यह जाँचा गया है (figure वाला ही input)। Studio की help में यह block buttons बन जाता है, जिनसे इसे वहीं load करके चलाया जा सकता है।

img_to_video 0.50 0.50
tb_background_subtraction_window 0.50 0.50

▸ यह pipeline load करें  ·  Load करके चलाएँ

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

नीचे के उदाहरण मूल ledger op background_subtraction_window को call करते हैं। यह bridge op वही implementation है, बस fn(v, a, b) convention के अनुसार ढाला गया है, इसलिए व्यवहार वैसा ही लागू होता है (केवल call का रूप अलग है)।

• video_streaming — py -3.11 examples/video_streaming.py

वे अगले ops जिनसे type जुड़ता है (video को input के रूप में लेते हैं)

identity · tb_temporal_bandpass · tb_temporal_band_power · tb_temporal_median_window · tb_moving_average_window · tb_frame_difference_causal · tb_exponential_background · tb_exponential_foreground

इसी category के (typed)

tb_points_to_voxel · tb_estimate_point_normals · tb_iss_keypoints · tb_project_points · tb_render_point_depth · tb_statistical_outlier_removal · tb_radius_outlier_removal · tb_voxel_grid_downsample


*Provenance: ops.py — 2D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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