Skip to content

text_createOCRHMMTransitionsTable

textfunctionOpenCV 5.0.0
import { text_createOCRHMMTransitionsTable } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSvocabulary, lexicon
FUNCTIONtext_createOCRHMMTransitionsTable
RETURN TYPEMat
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

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;
vocabulary

The language vocabulary (chars when ASCII English text).

lexicon

The list of words that are expected to be found in a particular image.

Returns

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.