Skip to main content

Module preprocess

Module preprocess 

Source
Expand description

Greyscale image preprocessing for OCR models.

Structs§

ImageSource
Input image for crate::OcrEngine::prepare_input.

Enums§

DimOrder
Pixel layout for image tensors.
ImageSourceError
Errors when constructing an ImageSource.

Constants§

BLACK_VALUE
Normalized greyscale background value used by ocrs models (matches ocrs 0.12.x).

Functions§

prepare_image
Convert an image to a normalized greyscale CHW tensor [1, H, W].