Skip to main content

load_images

Function load_images 

Source
pub fn load_images<P>(
    paths: &[P],
) -> Result<Vec<ImageBuffer<Rgb<u8>, Vec<u8>>>, OCRError>
where P: AsRef<Path> + Send + Sync,
Expand description

Loads a batch of images from file paths.

This function loads multiple images from the specified file paths and converts them to RgbImages. It uses parallel processing when the number of images exceeds the default parallel threshold.

§Arguments

  • paths - A slice of paths to the image files to load

§Returns

  • Ok(Vec<RgbImage>) - A vector of loaded RGB images
  • Err(OCRError) - An error if any image could not be loaded

§Errors

This function will return an OCRError if any image cannot be loaded from its specified path.