libs.services
Cloud OCR adapters and the dispatcher that extract_logsheet()
uses via formhtr.libs.services.call_services.
- formhtr.libs.services.call_services.call_services(logsheet_image, credentials, config)[source]
Run enabled OCR backends on one rasterized page.
- Parameters:
logsheet_image –
numpyimage array (RGB/BGR) of the aligned page.credentials – Dict with keys
google,amazon,azure. Values are a path string (Google), a credential dict (Amazon/Azure), or falsy to skip.config – Object with
widthandheight(page size) for Amazon box scaling.
- Returns:
Dict with keys
google,amazon,azure. Each value is a list ofRectangleinstances, orNoneif that provider was not used or returned nothing.