You are here: Start » AVL.NET » Function Reference » Computer Vision » Optical Character Recognition » AVL.ReadText

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
inCharactersSystem.Collections.Generic.IList<AvlNet.Region>Character regions.
inOcrModelAvlNet.OcrModelOCR model specific to a particular font.
inMinScorefloat<0.0f, 1.0f>Minimal score of reading a character.
outTextstringRead text.
outCharactersSystem.Collections.Generic.IList<AvlNet.NullableRef<string>>Array of characters. NIL indicates invalid read when inMinScore is set,.
outScoresSystem.Collections.Generic.IList<float>Reading scores for each character.
outIsTextValidboolReturns 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

List of possible exceptions:

Error type Description
DomainError Uninitialized OCR model in ReadText. OCR model must be trained before use.

See also