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
cbERFilterCallbackCallback with the classifier.
thresholdDeltaintThreshold step in subsequent thresholds when extracting the component tree.
minAreafloatThe minimum area (% of image size) allowed for retrieved ER's.
maxAreafloatThe maximum area (% of image size) allowed for retrieved ER's.
minProbabilityfloatThe minimum probability P(er|character) allowed for retrieved ER's.
nonMaxSuppressionboolWhether non-maximum suppression is done over the branch probabilities.
minProbabilityDifffloatThe minimum probability difference between local maxima and local minima ERs.
Returns
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
filenamestringThe XML or YAML file with the classifier model.
thresholdDeltaintThreshold step in subsequent thresholds when extracting the component tree.
minAreafloatThe minimum area (% of image size) allowed for retrieved ER's.
maxAreafloatThe maximum area (% of image size) allowed for retrieved ER's.
minProbabilityfloatThe minimum probability P(er|character) allowed for retrieved ER's.
nonMaxSuppressionboolWhether non-maximum suppression is done over the branch probabilities.
minProbabilityDifffloatThe minimum probability difference between local maxima and local minima ERs.