Method Create
- Namespace
- OpenCvSharp.Text
- Assembly
- OpenCvSharp.dll
Create(string?, string?, string?, OcrEngineMode, PageSegMode)
Creates an instance of the OCRTesseract class. Initializes Tesseract.
public static OCRTesseract Create(string? datapath = null, string? language = null, string? charWhitelist = null, OcrEngineMode oem = OcrEngineMode.Default, PageSegMode psmode = PageSegMode.Auto)
Parameters
datapathstringdatapath the name of the parent directory of tessdata ended with "/", or null to use the system's default directory.
languagestringan ISO 639-3 code or NULL will default to "eng".
charWhiteliststringspecifies the list of characters used for recognition. null defaults to "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".
oemOcrEngineModetesseract-ocr offers different OCR Engine Modes (OEM), by deffault tesseract::OEM_DEFAULT is used.See the tesseract-ocr API documentation for other possible values.
psmodePageSegModetesseract-ocr offers different Page Segmentation Modes (PSM) tesseract::PSM_AUTO (fully automatic layout analysis) is used. See the tesseract-ocr API documentation for other possible values.