You are here: Start » AVL.NET » AVL.ReadText Method

AVL.ReadText Method

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

Name Type Range Default Description
inCharactersAvlNet.RegionCharacter regions.
inOcrModelAvlNet.OcrModelOCR model specific to a particular font.
inMinScorefloat<0.0f, 1.0f>Minimal score of reading a character.
outTextstringRead text.
outCharactersstringArray of characters. NIL indicates invalid read when inMinScore is set,.
outScoresfloatReading 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

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

See also