You are here: Start » AVL.NET » AVL.ReadText(AvlNet.Region[], AvlNet.OcrModel, float, string, string[], float[], bool)
AVL.ReadText(AvlNet.Region[], AvlNet.OcrModel, float, string, string[], float[], bool)
Ready-to-use tool for reading text from images using the OCR technique.
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
public static void ReadText( AvlNet.Region[] inCharacters, AvlNet.OcrModel inOcrModel, float inMinScore, out string outText, out string[] outCharacters, out float[] outScores, out bool outIsTextValid )
Parameters
- inCharacters
- Type: AvlNet.Region
Character regions - inOcrModel
- Type: AvlNet.OcrModel
OCR model specific to a particular font - inMinScore
- Type: System.Single
Minimal score of reading a character - outText
- Type: System.String
Read text - outCharacters
- Type: System.String
Array of characters. NIL indicates invalid read when inMinScore is set, - outScores
- Type: System.Single
Reading scores for each character - outIsTextValid
- Type: System.Boolean
Returns False if any ad score smaller than inMinScore
Description
This operation reads a text from the array of regions. Each region corresponds to a single letter at the filter output outText. Empty regions are omitted.
This filter uses a trained OcrModel which can be created using the TrainOcr_MLP or TrainOcr_SVM filter.
Typically this filter are connected with ExtractText which prepares input regions for reading.
Examples
![]() |
Result of reading text using the ReadText and ExtractText.
Remarks
To read more about how to use OCR technique, refer to Machine Vision Guide: Optical Character Recognition
Errors
| Error type | Description |
|---|---|
| DomainError | Uninitialized OCR model in ReadText. OCR model must be trained before use. |

