Start » Filter Reference » Computer Vision » Optical Character Recognition » ReadText

ReadText


Module: OCR

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

Name Type Range Description
Input value
inCharacters RegionArray Character regions
Input value
inOcrModel OcrModel OCR model specific to a particular font
Input value
inMinScore Real 0.0 - 1.0 Minimal score of reading a character
Output value
outText String Read text
Output value
outCharacters String?Array Array of characters. NIL indicates invalid read when inMinScore is set,
Output value
outScores RealArray Reading scores for each character
Output value
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.

Hints

  • 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\Aurora Vision\Aurora Vision Studio 4.x Professional\PretrainedFonts\ (Windows 7) and select the model you need.

Examples

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.

Remarks

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

Errors

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.