Skip to main content

PostProcessor

Trait PostProcessor 

Source
pub trait PostProcessor: Send + Sync {
    // Required methods
    fn process_mask(&self, mask: &Array2<u8>) -> Result<Array2<u8>>;
    fn name(&self) -> &'static str;
    fn description(&self) -> &'static str;

    // Provided method
    fn validate_parameters(&self) -> Result<()> { ... }
}
Expand description

Trait for post-processing glint masks.

Post-processors take binary masks and apply various refinement operations such as morphological operations, buffering, or filtering.

Required Methods§

Source

fn process_mask(&self, mask: &Array2<u8>) -> Result<Array2<u8>>

Apply post-processing to a binary mask

§Arguments
  • mask - Binary mask with shape (height, width)
§Returns

A processed binary mask with the same shape

Source

fn name(&self) -> &'static str

Get the name of this post-processor

Source

fn description(&self) -> &'static str

Get a description of this post-processor

Provided Methods§

Source

fn validate_parameters(&self) -> Result<()>

Validate that the post-processor parameters are valid

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§