Skip to main content

Module image_region

Module image_region 

Source
Expand description

Cheap image-region classifier + OCR budget (native + WASM). Image-region classification for OCR routing (SRP / Strategy).

Decides whether a raster should go through table OCR, prose OCR, or be skipped (charts / photos). Keeps the gate in one place so native and in-memory recovery share the same policy.

Structs§

ClassifyingRegionRouter
Classifier that runs heuristics, then optionally consults a table model.
HeuristicImageRegionClassifier
Cheap heuristic classifier (no ML). Wraps the existing raster heuristics in crate::pdf::raster_table_ocr so policy lives behind one trait.
NullTableStructureModel
No-op table-structure model (classical bordered-grid path only).
OcrBudget
Shared deadline tracker for OCR work across a document.

Enums§

ImageRegionKind
What to do with a page image region.

Traits§

ImageRegionClassifier
Strategy for classifying a grayscale page region.
TableStructureModel
Optional ML / table-structure model plugged into the Table branch.