Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Optical Character Recognition » ReadText


Module: OCR

Ready-to-use tool for reading text from images using the OCR technique.

Name Type Range Description
inCharacters RegionArray Character regions
inOcrModel OcrModel OCR model specific to a particular font
inMinScore Real 0.0 - 1.0 Minimal score of reading a character
outText String Read text
outCharacters String?Array Array of characters. NIL indicates invalid read when inMinScore is set,
outScores RealArray Reading scores for each character
outIsTextValid Bool Returns False if any ad score smaller than inMinScore


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.


  • Connect an array of character regions to the inCharacters input. Usually it will be the output of the ExtractText filter. Make sure that these regions are available (the program was previously run).
  • Enter the graphical editor for the inOcrModel input. Create the OCR model by gathering and annotating character samples.
  • Alternatively, you can use one of the pre-trained models. To do so, right-click on the inOcrModel input and select "Link from AVDATA file...". Then browse to the directory C:\ProgramData\Adaptive Vision\Adaptive Vision Studio 4.x Professional\PretrainedFonts\ (Windows 7) and select the model you need.


Description of usage of this filter can be found in examples and tutorial: OCR Read Number, Reading Numbers from Images, Typical OCR application.

Result of reading text using the ReadText and ExtractText.


To read more about how to use OCR technique, refer to Machine Vision Guide: Optical Character Recognition


This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

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

Complexity Level

This filter is available on Basic Complexity Level.

See Also

  • ExtractText – Ready-to-use tool for extracting and splitting character to single characters.
  • RecognizeCharacters – Classifies input regions into characters. Based on the Multi-Layer Perceptron model.
  • TrainOcr_MLP – Trains an OCR multilayer perceptron classifier.
  • TrainOcr_SVM – Trains an OCR support vector machines classifier.