Back to Adaptive Vision Studio website

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


Module: OCR

Creates training font samples from the provided regions.

Name Type Description
inCharacterRegions RegionArray Array of character regions
inCharacters String Character that should be assigned to corresponding regions
outCharacterSamples CharacterSampleArray Array of CharacterSamples


The operation creates a set of character samples used to train OcrMlpModel in the TrainOcr_MLP filter. Consecutive letters in inCharacters correspond to consecutive regions in inCharacterRegions.


Description of usage of this filter can be found in examples and tutorial: OCR Read Number (MLP), OCR Read Number (SVM), Preparing an OCR model.


The length of inCharacters must be equal to the size of the inCharacterRegions array.

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 At least a single character should be provided in MakeCharacterSamples.
DomainError Parameter inCharacterRegions contains empty region in MakeCharacterSamples.
DomainError The size of inCharacterRegions and the length of inCharacters are not equal in MakeCharacterSamples.

Complexity Level

This filter is available on Advanced Complexity Level.

See Also

  • TrainOcr_MLP – Trains an OCR multilayer perceptron classifier.