Skip to content

text_detectRegions1

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

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

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

Extracts text regions from image.

text_detectRegions1(image: Mat, er_filter1: text_ERFilter | null, er_filter2: text_ERFilter | null, groups_rects: RectVector, method: number, filename: EmbindString, minProbability: number): void;
4 available overloads
text_detectRegions1(image: Mat, er_filter1: text_ERFilter | null, er_filter2: text_ERFilter | null, groups_rects: RectVector): void;
text_detectRegions1(image: Mat, er_filter1: text_ERFilter | null, er_filter2: text_ERFilter | null, groups_rects: RectVector, method: number): void;
text_detectRegions1(image: Mat, er_filter1: text_ERFilter | null, er_filter2: text_ERFilter | null, groups_rects: RectVector, method: number, filename: EmbindString): void;
text_detectRegions1(image: Mat, er_filter1: text_ERFilter | null, er_filter2: text_ERFilter | null, groups_rects: RectVector, method: number, filename: EmbindString, minProbability: number): void;
image

Source image where text blocks needs to be extracted from. Should be CV_8UC3 (color).

er_filter1

Extremal Region Filter for the 1st stage classifier of N&M algorithm [Neumann12]

er_filter2

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

groups_rects

Output destination, filled by the native operation. Output list of rectangle blocks with text

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.

minProbability

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.