Skip to content

text_createERFilterNM2

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

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

Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm [Neumann12].

text_createERFilterNM2(cb: text_ERFilter_Callback | null, minProbability: number): text_ERFilter | null;
2 available overloads
text_createERFilterNM2(cb: text_ERFilter_Callback | null): text_ERFilter | null;
text_createERFilterNM2(cb: text_ERFilter_Callback | null, minProbability: number): text_ERFilter | null;
cb

: Callback with the classifier. Default classifier can be implicitly load with function loadClassifierNM2, e.g. from file in samples/cpp/trained_classifierNM2.xml

minProbability

: The minimum probability P(er|character) allowed for retreived ER's

In the second stage, the ERs that passed the first stage are classified into character and non-character classes using more informative but also more computationally expensive features. The classifier uses all the features calculated in the first stage and the following additional features: hole area ratio, convex hull ratio, and number of outer inflexion points.

Returns

The text_ERFilter | 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.