Skip to main content

GlintAlgorithm

Trait GlintAlgorithm 

Source
pub trait GlintAlgorithm: Send + Sync {
    // Required methods
    fn detect_glint(&self, image: &Array3<f64>) -> Result<Array2<u8>>;
    fn name(&self) -> &'static str;
    fn description(&self) -> &'static str;

    // Provided methods
    fn validate_parameters(&self) -> Result<()> { ... }
    fn required_bands(&self) -> Option<usize> { ... }
    fn supports_bands(&self, band_count: usize) -> bool { ... }
}
Expand description

Trait for glint detection algorithms.

This trait defines the interface for algorithms that can detect glint (specular reflections) in imagery. Algorithms take normalized image data and return a binary mask indicating glint pixels.

Required Methods§

Source

fn detect_glint(&self, image: &Array3<f64>) -> Result<Array2<u8>>

Apply the glint detection algorithm to an image

§Arguments
  • image - Normalized image data (values in [0, 1]) with shape (height, width, channels)
§Returns

A binary mask where:

  • 1 indicates glint pixels (to be masked)
  • 0 indicates non-glint pixels (to keep)

The output mask has shape (height, width)

Source

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

Get the name of this algorithm

Source

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

Get a description of this algorithm

Provided Methods§

Source

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

Validate that the algorithm parameters are valid

Source

fn required_bands(&self) -> Option<usize>

Get the required number of bands for this algorithm

Returns None if the algorithm can work with any number of bands

Source

fn supports_bands(&self, band_count: usize) -> bool

Check if this algorithm supports the given band configuration

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§