pub trait Preprocessor: Send + 'static {
// Required method
fn process(
&mut self,
view: &FrameView<'_>,
) -> Result<Arc<Frame>, DetectorError>;
// Provided method
fn set_label(&mut self, _label: &str) { ... }
}Expand description
Transforms a watcher’s cropped view into the frame the rest of the pipeline sees. Runs BEFORE the implicit frame-diff gate, so a preprocessor whose output is static (e.g. a fully-suppressed stability mask) holds the detector at zero cost until its output actually changes.
Preprocessors run every tick on the async path — they must be cheap (block math, copies), never heavy inference.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".