pub fn load_images_batch_with_threshold<P>(
paths: &[P],
parallel_threshold: Option<usize>,
) -> Result<Vec<ImageBuffer<Rgb<u8>, Vec<u8>>>, OCRError>Expand description
Loads a batch of images from file paths with a custom parallel threshold.
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 specified threshold, or the default threshold if none is provided.
§Arguments
paths- A slice of paths to the image files to loadparallel_threshold- An optional threshold for parallel processing. IfNone, the default threshold fromDEFAULT_PARALLEL_THRESHOLDis used.
§Returns
Ok(Vec<RgbImage>)- A vector of loaded RGB imagesErr(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.