pub fn detect_text_swt_def(
input: &impl ToInputArray,
result: &mut Vector<Rect>,
dark_on_light: bool,
) -> Result<()>
Expand description
Applies the Stroke Width Transform operator followed by filtering of connected components of similar Stroke Widths to return letter candidates. It also chain them by proximity and size, saving the result in chainBBs.
§Parameters
- input: the input image with 3 channels.
- result: a vector of resulting bounding boxes where probability of finding text is high
- dark_on_light: a boolean value signifying whether the text is darker or lighter than the background, it is observed to reverse the gradient obtained from Scharr operator, and significantly affect the result.
- draw: an optional Mat of type CV_8UC3 which visualises the detected letters using bounding boxes.
- chainBBs: an optional parameter which chains the letter candidates according to heuristics in the paper and returns all possible regions where text is likely to occur.
§Note
This alternative version of detect_text_swt function uses the following default values for its arguments:
- draw: noArray()
- chain_b_bs: noArray()