Skip to content

text_erGrouping

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

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

ARGUMENTSimage, channel, regions, groups_rects
FUNCTIONtext_erGrouping
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Find groups of Extremal Regions that are organized as text blocks.

text_erGrouping(image: Mat, channel: Mat, regions: PointVectorVector, groups_rects: RectVector, method: number, filename: EmbindString, minProbablity: number): void;
4 available overloads
text_erGrouping(image: Mat, channel: Mat, regions: PointVectorVector, groups_rects: RectVector): void;
text_erGrouping(image: Mat, channel: Mat, regions: PointVectorVector, groups_rects: RectVector, method: number): void;
text_erGrouping(image: Mat, channel: Mat, regions: PointVectorVector, groups_rects: RectVector, method: number, filename: EmbindString): void;
text_erGrouping(image: Mat, channel: Mat, regions: PointVectorVector, groups_rects: RectVector, method: number, filename: EmbindString, minProbablity: number): void;
image

image argument (Mat).

channel

channel argument (Mat).

regions

Vector of ER's retrieved from the ERFilter algorithm from each channel.

groups_rects

Output destination, filled by the native operation. The output of the algorithm are stored in this parameter as list of rectangles.

method

Grouping method (see text::erGrouping_Modes). Can be one of ERGROUPING_ORIENTATION_HORIZ, ERGROUPING_ORIENTATION_ANY.

filename

The XML or YAML file with the classifier model (e.g. samples/trained_classifier_erGrouping.xml). Only to use when grouping method is ERGROUPING_ORIENTATION_ANY.

minProbablity

The minimum probability for accepting a group. Only to use when grouping method is ERGROUPING_ORIENTATION_ANY.

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.