Skip to main content

Module ocr

Module ocr 

Source
Expand description

OCR backend selector.

macOS uses VNRecognizeTextRequest (accurate, language correction on). Windows and Linux return Unsupported until P12 (Windows) and later phases. The mock backend short-circuits to an in-memory provider.

Structs§

ImageRect
Image-pixel rectangle (top-left origin), used by both the recognizer and the secure-field redaction logic.
OcrBlock
One recognized text line with image-pixel coordinates.
OcrResult
Result of one OCR pass on a captured window.

Functions§

recognize
Run OCR on image and return per-line blocks.
redact_blocks
Drop every OCR block whose rect falls inside any secure-field frame.