[][src]Function opencv::text::mse_rs_to_er_stats

pub fn mse_rs_to_er_stats(
    image: &dyn ToInputArray,
    contours: &mut Vector<Vector<Point>>,
    regions: &mut Vector<Vector<ERStat>>
) -> Result<()>

Converts MSER contours (vector<Point>) to ERStat regions.

Parameters

  • image: Source image CV_8UC1 from which the MSERs where extracted.

  • contours: Input vector with all the contours (vector<Point>).

  • regions: Output where the ERStat regions are stored.

It takes as input the contours provided by the OpenCV MSER feature detector and returns as output two vectors of ERStats. This is because MSER() output contains both MSER+ and MSER- regions in a single vector<Point>, the function separates them in two different vectors (this is as if the ERStats where extracted from two different channels).

An example of MSERsToERStats in use can be found in the text detection webcam_demo: https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/webcam_demo.cpp