text_loadOCRHMMClassifierNM
import { text_loadOCRHMMClassifierNM } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Allow to implicitly load the default character classifier when creating an OCRHMMDecoder object.
deprecated: loadOCRHMMClassifier instead
text_loadOCRHMMClassifierNM(filename: EmbindString): text_OCRHMMDecoder_ClassifierCallback | null;filenameThe XML or YAML file with the classifier model (e.g. OCRHMM_knn_model_data.xml)
The KNN default classifier is based in the scene text recognition method proposed by Lukás Neumann & Jiri Matas in [Neumann11b]. Basically, the region (contour) in the input image is normalized to a fixed size, while retaining the centroid and aspect ratio, in order to extract a feature vector based on gradient orientations along the chain-code of its perimeter. Then, the region is classified using a KNN model trained with synthetic data of rendered characters with different standard font types.
The text_OCRHMMDecoder_ClassifierCallback | 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.