Expand description
OCR backend contract surface and concrete backends.
The OcrBackend trait is intentionally narrow: finalized image bytes in,
flat OCR spans out. Preprocessing, multi-page orchestration, and layout
reconstruction stay above or below this module so backend plurality can
arrive later without widening the trust boundary.
Re-exports§
pub use tesseract::TesseractBackend;ocr-tesseract
Modules§
- tesseract
ocr-tesseract - Tesseract subprocess OCR adapter.
Structs§
- BBox
- Bounding box in image pixel coordinates.
- Image
Input - Finalized image payload for one OCR pass.
- Language
Tag - Backend language tag.
- OcrHints
- OCR backend hints. Backends may downgrade hints they cannot support.
- OcrResult
- Result of an OCR pass: full text + a structured confidence summary.
- OcrSpan
- One OCR text span emitted by a backend.
Enums§
- Image
Format - Raster image format handed to an OCR backend.
- OcrError
- Closed OCR backend error surface.
Traits§
- OcrBackend
- Narrow OCR backend contract.
Functions§
- detect_
image_ format - Detect the encoded image format from magic bytes.