[−][src]Function opencv::text::er_grouping
pub fn er_grouping(
img: &dyn ToInputArray,
channels: &dyn ToInputArray,
regions: &mut Vector<Vector<ERStat>>,
groups: &mut Vector<Vector<Vec2i>>,
groups_rects: &mut Vector<Rect>,
method: i32,
filename: &str,
min_probablity: f32
) -> Result<()>
Find groups of Extremal Regions that are organized as text blocks.
Parameters
-
img: Original RGB or Greyscale image from wich the regions were extracted.
-
channels: Vector of single channel images CV_8UC1 from wich the regions were extracted.
-
regions: Vector of ER's retrieved from the ERFilter algorithm from each channel.
-
groups: The output of the algorithm is stored in this parameter as set of lists of indexes to provided regions.
-
groups_rects: The output of the algorithm are stored in this parameter as list of rectangles.
-
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.
-
minProbablity: The minimum probability for accepting a group. Only to use when grouping method is ERGROUPING_ORIENTATION_ANY.
C++ default parameters
- method: ERGROUPING_ORIENTATION_HORIZ
- filename: std::string()
- min_probablity: 0.5