text_createOCRHMMTransitionsTable
import { text_createOCRHMMTransitionsTable } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Utility function to create a tailored language model transitions table from a given list of words (lexicon).
Note: - (C++) An alternative would be to load the default generic language transition table provided in the text module samples folder (created from ispell 42869 english words list) : https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/OCRHMM_transitions_table.xml
text_createOCRHMMTransitionsTable(vocabulary: EmbindString, lexicon: StringVector): Mat;vocabularyThe language vocabulary (chars when ASCII English text).
lexiconThe list of words that are expected to be found in a particular image.
The Mat result. Release returned native handles with using or delete(), including handles nested in results.
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.