/// <summary> /// Create an Extremal Region Filter for the 2nd stage classifier of N&M algorithm /// </summary> /// <param name="cb">Callback with the classifier. Default classifier can be implicitly load with function loadClassifierNM2()</param> /// <param name="minProbability">The minimum probability per character allowed for retreived ER’s</param> /// <returns></returns> public static ERFilter CreateERFilterNM2(ERFilter.Callback cb, float minProbability = 0.3f) { IntPtr obj = NativeMethods.text_createERFilterNM2(cb.CvPtr, minProbability); return(new ERFilter(obj, cb)); }
/// <summary> /// Creates an Extremal Region Filter for the 1st stage classifier of N&M algorithm [Neumann12]. /// </summary> /// <param name="cb">Callback with the classifier. Default classifier can be implicitly load with function loadClassifierNM1()</param> /// <param name="thresholdDelta">Threshold step in subsequent thresholds when extracting the component tree</param> /// <param name="minArea">The minimum area (% of image size) allowed for retreived ER’s</param> /// <param name="maxArea">The maximum area (% of image size) allowed for retreived ER’s</param> /// <param name="minProbability">The minimum probability P(er|character) allowed for retreived ER’s</param> /// <param name="nonMaxSuppression">Whenever non-maximum suppression is done over the branch probabilities</param> /// <param name="minProbabilityDiff">The minimum probability difference between local maxima and local minima ERs</param> /// <returns></returns> public static ERFilter CreateERFilterNM1(ERFilter.Callback cb, int thresholdDelta = 1, float minArea = 0.00025f, float maxArea = 0.13f, float minProbability = 0.4f, bool nonMaxSuppression = true, float minProbabilityDiff = 0.1f) { IntPtr obj = NativeMethods.text_createERFilterNM1(cb.CvPtr, thresholdDelta, minArea, maxArea, minProbability, nonMaxSuppression, minProbabilityDiff); return(new ERFilter(obj, cb)); }