[−][src]Function opencv::text::create_er_filter_nm1_1
pub fn create_er_filter_nm1_1(
filename: &str,
threshold_delta: i32,
min_area: f32,
max_area: f32,
min_probability: f32,
non_max_suppression: bool,
min_probability_diff: f32
) -> Result<Ptr<dyn ERFilter>>
Reads an Extremal Region Filter for the 1st stage classifier of N&M algorithm from the provided path e.g. /path/to/cpp/trained_classifierNM1.xml
Create an Extremal Region Filter for the 1st stage classifier of N&M algorithm Neumann12.
Parameters
- cb: : Callback with the classifier. Default classifier can be implicitly load with function loadClassifierNM1, e.g. from file in samples/cpp/trained_classifierNM1.xml
- thresholdDelta: : Threshold step in subsequent thresholds when extracting the component tree
- minArea: : The minimum area (% of image size) allowed for retreived ER's
- maxArea: : The maximum area (% of image size) allowed for retreived ER's
- minProbability: : The minimum probability P(er|character) allowed for retreived ER's
- nonMaxSuppression: : Whenever non-maximum suppression is done over the branch probabilities
- minProbabilityDiff: : The minimum probability difference between local maxima and local minima ERs
The component tree of the image is extracted by a threshold increased step by step from 0 to 255, incrementally computable descriptors (aspect_ratio, compactness, number of holes, and number of horizontal crossings) are computed for each ER and used as features for a classifier which estimates the class-conditional probability P(er|character). The value of P(er|character) is tracked using the inclusion relation of ER across all thresholds and only the ERs which correspond to local maximum of the probability P(er|character) are selected (if the local maximum of the probability is above a global limit pmin and the difference between local maximum and local minimum is greater than minProbabilityDiff).
Overloaded parameters
C++ default parameters
- threshold_delta: 1
- min_area: (float)0.00025
- max_area: (float)0.13
- min_probability: (float)0.4
- non_max_suppression: true
- min_probability_diff: (float)0.1