You are here: Start » AVL.NET » AVL.ReadText
Ready-to-use tool for reading text from images using the OCR technique.
Namespace: | AvlNet |
---|---|
Assembly: | AVL.NET.dll |
Syntax
C++
C#
public static void ReadText ( IList<AvlNet.Region> inCharacters, AvlNet.OcrModel inOcrModel, float inMinScore, out string outText, IList<NullableRef<string>> outCharacters, IList<float> outScores, out bool outIsTextValid )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inCharacters | System.Collections.Generic.IList<AvlNet.Region> | Character regions. | |||
inOcrModel | AvlNet.OcrModel | OCR model specific to a particular font. | |||
inMinScore | float | <0.0f, 1.0f> | Minimal score of reading a character. | ||
outText | string | Read text. | |||
outCharacters | System.Collections.Generic.IList<AvlNet.NullableRef<string>> | Array of characters. NIL indicates invalid read when inMinScore is set,. | |||
outScores | System.Collections.Generic.IList<float> | Reading scores for each character. | |||
outIsTextValid | bool | 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
Remarks
To read more about how to use OCR technique, refer to Machine Vision Guide: Optical Character Recognition
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Uninitialized OCR model in ReadText. OCR model must be trained before use. |