Table of Contents

Class CvText

Namespace
OpenCvSharp.Text
Assembly
OpenCvSharp.dll

cv::text functions

public static class CvText
Inheritance
CvText
Inherited Members

Methods

DetectTextSWT(InputArray, bool, OutputArray?, OutputArray?)

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.

public static Rect[] DetectTextSWT(InputArray input, bool darkOnLight, OutputArray? draw = null, OutputArray? chainBBs = null)

Parameters

input InputArray

input the input image with 3 channels.

darkOnLight bool

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 OutputArray

an optional Mat of type CV_8UC3 which visualises the detected letters using bounding boxes.

chainBBs OutputArray

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.

Returns

Rect[]

a vector of resulting bounding boxes where probability of finding text is high