text_OCRTesseract_create
import { text_OCRTesseract_create } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Creates an instance of the OCRTesseract class. Initializes Tesseract.
Note: The char_whitelist default is changed after OpenCV 4.7.0/3.19.0 from "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" to "".
text_OCRTesseract_create(datapath: EmbindString, language: EmbindString, char_whitelist: EmbindString, oem: number, psmode: number): text_OCRTesseract | null;6 available overloads
text_OCRTesseract_create(): text_OCRTesseract | null;text_OCRTesseract_create(datapath: EmbindString): text_OCRTesseract | null;text_OCRTesseract_create(datapath: EmbindString, language: EmbindString): text_OCRTesseract | null;text_OCRTesseract_create(datapath: EmbindString, language: EmbindString, char_whitelist: EmbindString): text_OCRTesseract | null;text_OCRTesseract_create(datapath: EmbindString, language: EmbindString, char_whitelist: EmbindString, oem: number): text_OCRTesseract | null;text_OCRTesseract_create(datapath: EmbindString, language: EmbindString, char_whitelist: EmbindString, oem: number, psmode: number): text_OCRTesseract | null;datapaththe name of the parent directory of tessdata ended with "/", or NULL to use the system's default directory.
languagean ISO 639-3 code or NULL will default to "eng".
char_whitelistspecifies the list of characters used for recognition. NULL defaults to "" (All characters will be used for recognition).
oemtesseract-ocr offers different OCR Engine Modes (OEM), by default tesseract::OEM_DEFAULT is used. See the tesseract-ocr API documentation for other possible values.
psmodetesseract-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.
The text_OCRTesseract | null result.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.