Table of Contents

Method CreateNM1

Namespace
OpenCvSharp.Text
Assembly
OpenCvSharp.dll

CreateNM1(ERFilterCallback, int, float, float, float, bool, float)

Creates an Extremal Region Filter for the 1st stage classifier of the N&M algorithm.

public static ERFilter CreateNM1(ERFilterCallback cb, int thresholdDelta = 1, float minArea = 0.00025, float maxArea = 0.13, float minProbability = 0.4, bool nonMaxSuppression = true, float minProbabilityDiff = 0.1)

Parameters

cb ERFilterCallback

Callback with the classifier.

thresholdDelta int

Threshold step in subsequent thresholds when extracting the component tree.

minArea float

The minimum area (% of image size) allowed for retrieved ER's.

maxArea float

The maximum area (% of image size) allowed for retrieved ER's.

minProbability float

The minimum probability P(er|character) allowed for retrieved ER's.

nonMaxSuppression bool

Whether non-maximum suppression is done over the branch probabilities.

minProbabilityDiff float

The minimum probability difference between local maxima and local minima ERs.

Returns

ERFilter

CreateNM1(string, int, float, float, float, bool, float)

Creates an Extremal Region Filter for the 1st stage classifier of the N&M algorithm, reading the classifier from the given file (e.g. trained_classifierNM1.xml).

public static ERFilter CreateNM1(string filename, int thresholdDelta = 1, float minArea = 0.00025, float maxArea = 0.13, float minProbability = 0.4, bool nonMaxSuppression = true, float minProbabilityDiff = 0.1)

Parameters

filename string

The XML or YAML file with the classifier model.

thresholdDelta int

Threshold step in subsequent thresholds when extracting the component tree.

minArea float

The minimum area (% of image size) allowed for retrieved ER's.

maxArea float

The maximum area (% of image size) allowed for retrieved ER's.

minProbability float

The minimum probability P(er|character) allowed for retrieved ER's.

nonMaxSuppression bool

Whether non-maximum suppression is done over the branch probabilities.

minProbabilityDiff float

The minimum probability difference between local maxima and local minima ERs.

Returns

ERFilter