pub trait OcrBackend: Send + Sync {
// Required methods
fn recognize(
&self,
image_data: &[u8],
width: u32,
height: u32,
) -> Result<OcrResult, OcrError>;
fn name(&self) -> &str;
}Expand description
Pluggable OCR backend.
Implementations receive raw RGB pixel data and return recognized text.
Implementations must be Send + Sync so they can be held in a static
or shared across threads.
Required Methods§
Implementors§
impl OcrBackend for AwsTextractBackend
Available on crate feature
ocr-aws only.impl OcrBackend for AzureDocIntelBackend
Available on crate feature
ocr-azure only.impl OcrBackend for GoogleVisionBackend
Available on crate feature
ocr-google only.impl OcrBackend for MistralOcrBackend
Available on crate feature
ocr-mistral only.impl OcrBackend for OcrsBackend
Available on crate feature
ocr only.impl OcrBackend for PaddleOnnxBackend
Available on crate feature
ocr-onnx only.