TsgcAIDocumentExtractor › Properties › OCR

OCR Property

Local OCR component used by OCRMode.

Syntax

property OCR: TsgcAIOCR_Base read FOCR write SetOCR;

Default Value

—

Remarks

Links a local OCR component: TsgcAIOCRTesseract, which runs the Tesseract command line tool, or TsgcAIOCRWindows, which uses the OCR engine built into Windows 10 and later. It is used only when OCRMode is domFallback or domAlways; an OCRMode other than domNone without OCR raises EsgcAIDocumentExtractor.

Example

oOCR := TsgcAIOCRTesseract.Create(nil);
oExtractor.OCR := oOCR;
oExtractor.OCRMode := domFallback;

// or the OCR built into Windows
oExtractor.OCR := TsgcAIOCRWindows.Create(nil);

Back to Properties