| OCRTesseractRun Method (Mat, String, Rect, String, Single, ComponentLevels) |
Recognize text using the tesseract-ocr API.
Takes image on input and returns recognized text in the output_text parameter.
Optionally provides also the Rects for individual text elements found(e.g.words),
and the list of those text elements with their confidence values.
Namespace:
OpenCvSharp.Text
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public override void Run(
Mat image,
out string outputText,
out Rect[] componentRects,
out string[] componentTexts,
out float[] componentConfidences,
ComponentLevels componentLevel = ComponentLevels.Word
)
Public Overrides Sub Run (
image As Mat,
<OutAttribute> ByRef outputText As String,
<OutAttribute> ByRef componentRects As Rect(),
<OutAttribute> ByRef componentTexts As String(),
<OutAttribute> ByRef componentConfidences As Single(),
Optional componentLevel As ComponentLevels = ComponentLevels.Word
)
public:
virtual void Run(
Mat^ image,
[OutAttribute] String^% outputText,
[OutAttribute] array<Rect>^% componentRects,
[OutAttribute] array<String^>^% componentTexts,
[OutAttribute] array<float>^% componentConfidences,
ComponentLevels componentLevel = ComponentLevels::Word
) override
abstract Run :
image : Mat *
outputText : string byref *
componentRects : Rect[] byref *
componentTexts : string[] byref *
componentConfidences : float32[] byref *
?componentLevel : ComponentLevels
(* Defaults:
let _componentLevel = defaultArg componentLevel ComponentLevels.Word
*)
-> unit
override Run :
image : Mat *
outputText : string byref *
componentRects : Rect[] byref *
componentTexts : string[] byref *
componentConfidences : float32[] byref *
?componentLevel : ComponentLevels
(* Defaults:
let _componentLevel = defaultArg componentLevel ComponentLevels.Word
*)
-> unit
Parameters
- image
- Type: OpenCvSharpMat
Input image CV_8UC1 or CV_8UC3 - outputText
- Type: SystemString
Output text of the tesseract-ocr. - componentRects
- Type: OpenCvSharpRect
If provided the method will output a list of Rects for the individual
text elements found(e.g.words or text lines). - componentTexts
- Type: SystemString
If provided the method will output a list of text strings for the
recognition of individual text elements found(e.g.words or text lines). - componentConfidences
- Type: SystemSingle
If provided the method will output a list of confidence values
for the recognition of individual text elements found(e.g.words or text lines). - componentLevel (Optional)
- Type: OpenCvSharp.TextComponentLevels
OCR_LEVEL_WORD (by default), or OCR_LEVEL_TEXT_LINE.
See Also