Method Run
- Namespace
- OpenCvSharp.Text
- Assembly
- OpenCvSharp.dll
Run(Mat, out string, out Rect[], out string?[], out float[], 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.
public override void Run(Mat image, out string outputText, out Rect[] componentRects, out string?[] componentTexts, out float[] componentConfidences, ComponentLevels componentLevel = ComponentLevels.Word)
Parameters
imageMatInput image CV_8UC1 or CV_8UC3
outputTextstringOutput text of the tesseract-ocr.
componentRectsRect[]If provided the method will output a list of Rects for the individual text elements found(e.g.words or text lines).
componentTextsstring[]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).
componentConfidencesfloat[]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).
componentLevelComponentLevelsOCR_LEVEL_WORD (by default), or OCR_LEVEL_TEXT_LINE.
Run(Mat, Mat, out string, out Rect[], out string?[], out float[], 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.
public override void Run(Mat image, Mat mask, out string outputText, out Rect[] componentRects, out string?[] componentTexts, out float[] componentConfidences, ComponentLevels componentLevel = ComponentLevels.Word)
Parameters
imageMatInput image CV_8UC1 or CV_8UC3
maskMatoutputTextstringOutput text of the tesseract-ocr.
componentRectsRect[]If provided the method will output a list of Rects for the individual text elements found(e.g.words or text lines).
componentTextsstring[]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).
componentConfidencesfloat[]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).
componentLevelComponentLevelsOCR_LEVEL_WORD (by default), or OCR_LEVEL_TEXT_LINE.