pub struct StabilityMask { /* private fields */ }Expand description
Temporal stability mask: keeps only blocks that are stable over recent ticks yet novel versus a longer-term baseline — isolating newly-appeared static overlays (tooltips) from moving gameplay and permanent HUD. Suppressed blocks render black; kept blocks pass through byte-identical. See the design spec for the algebra.
Implementations§
Source§impl StabilityMask
impl StabilityMask
pub fn new() -> Self
Sourcepub fn block_size(self, px: u32) -> Self
pub fn block_size(self, px: u32) -> Self
Analysis block size in pixels (default 16).
Sourcepub fn stable_ticks(self, k: u32) -> Self
pub fn stable_ticks(self, k: u32) -> Self
Consecutive stable ticks before a block counts as stable (default 6).
Sourcepub fn stable_for(self, rate: Rate, duration: Duration) -> Self
pub fn stable_for(self, rate: Rate, duration: Duration) -> Self
Duration form of Self::stable_ticks; converted via the watcher’s
rate (tick-based internals keep paused-time tests deterministic).
Sourcepub fn baseline_ticks(self, t: u32) -> Self
pub fn baseline_ticks(self, t: u32) -> Self
Baseline EMA horizon in ticks (default 100).
Sourcepub fn baseline(self, rate: Rate, duration: Duration) -> Self
pub fn baseline(self, rate: Rate, duration: Duration) -> Self
Duration form of Self::baseline_ticks.
Sourcepub fn dilate(self, rings: u32) -> Self
pub fn dilate(self, rings: u32) -> Self
Keep-mask dilation rings (default 1) — keeps glyphs off the fill boundary and closes holes inside kept clusters.
Sourcepub fn signature_tolerance(self, tol: u8) -> Self
pub fn signature_tolerance(self, tol: u8) -> Self
Stability comparison tolerance on the 0-255 luma signature (default 4).
Sourcepub fn baseline_threshold(self, thr: u8) -> Self
pub fn baseline_threshold(self, thr: u8) -> Self
Novelty threshold versus the baseline (default 25).
Sourcepub fn debug_sink(self, sink: impl DebugSink) -> Self
pub fn debug_sink(self, sink: impl DebugSink) -> Self
Attach a debug tap (e.g. PngDump) receiving
per-tick Input/Baseline/Overlay/Output frames. Composable —
multiple sinks allowed. Stage frames are only materialized when at
least one sink is attached.