Skip to main content

glint_mask_tools/
lib.rs

1/// Rust implementation of glint mask generation tools for UAV and aerial imagery.
2///
3/// This library provides tools for detecting and masking specular reflections (glint)
4/// in aerial and UAV imagery. It supports multiple sensor types and provides a
5/// flexible, extensible architecture for adding new sensors and algorithms.
6///
7/// # Overview
8///
9/// The core workflow involves:
10/// 1. Loading images from various sensor formats
11/// 2. Applying glint detection algorithms (threshold-based)
12/// 3. Post-processing masks (pixel buffering)
13/// 4. Outputting masks compatible with photogrammetry software
14///
15/// # Architecture
16///
17/// The library is built around three main traits:
18/// - [`ImageLoader`]: Handles loading images from different sensor formats
19/// - [`GlintAlgorithm`]: Implements glint detection algorithms
20/// - [`PostProcessor`]: Handles post-processing of generated masks
21///
22/// These are composed together using the [`Masker`] struct, which orchestrates
23/// the entire processing pipeline.
24pub mod algorithms;
25pub mod cli;
26pub mod config;
27pub mod core;
28pub mod error;
29pub mod loaders;
30pub mod utils;
31
32// Re-export commonly used types
33pub use core::{
34    algorithm::GlintAlgorithm,
35    image_loader::ImageLoader,
36    masker::{Masker, MaskerBuilder},
37    postprocessor::PostProcessor,
38    sensor::{Sensor, SensorRegistry},
39};
40
41pub use algorithms::threshold::ThresholdAlgorithm;
42pub use error::{GlintError, Result};
43pub use loaders::{
44    big_tiff::BigTiffLoader,
45    multi_file::{BandScheme, ConfigurableMultiFileLoader, MultiFileLoaderConfig},
46    single_file::SingleFileLoader,
47};
48
49/// Current version of the library
50pub const VERSION: &str = env!("CARGO_PKG_VERSION");