Skip to main content

ImagePreprocessor

Trait ImagePreprocessor 

Source
pub trait ImagePreprocessor: Send + Sync {
    // Required method
    fn preprocess(&self, bytes: &[u8]) -> Result<PixelBatch>;
}
Expand description

Turns encoded image bytes (PNG/JPEG/WebP) into normalized pixel batches.

Required Methods§

Source

fn preprocess(&self, bytes: &[u8]) -> Result<PixelBatch>

Decodes and preprocesses one image.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§