You are here: Start » Function Reference » Optical Character Recognition Deprecated » RecognizeCharacters_MLP_Deprecated

RecognizeCharacters_MLP_Deprecated
Header: | FIL.h |
---|---|
Namespace: | fil |
Classifies input regions into characters. Based on the Multi-Layer Perceptron model.
Syntax
void fil::RecognizeCharacters_MLP_Deprecated ( const ftl::Array<fil::Region>& inCharacterRegions, const fil::OcrMlpModel& inOcrModel, ftl::Optional<const fil::Size&> inCharacterSize, const bool inDotPrint, const fil::CharacterSortingOrder::Type inCharacterSorting, ftl::Optional<float> inMinScore, ftl::Optional<int> inMinSpaceWidth, ftl::String& outCharacters, ftl::Array<float>& outScores, ftl::Array<ftl::Array<fil::OcrCandidate> >& outCandidates, ftl::Array<fil::Image>& diagNormalizedCharacters, ftl::Array<fil::Box>& diagCharactersBoxes )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inCharacterRegions | const Array<Region>& | Array of character regions to recognize | ||
![]() |
inOcrModel | const OcrMlpModel& | Trained OcrMlpModel used to recognize characters | ||
![]() |
inCharacterSize | Optional<const Size&> | NIL | Size of single monospaced character if needed | |
![]() |
inDotPrint | const bool | Dot-printed characters preprocessing | ||
![]() |
inCharacterSorting | const CharacterSortingOrder::Type | LeftToRight | Sorting order of input characters | |
![]() |
inMinScore | Optional<float> | 0.0 - 1.0 | NIL | Minimal value of accepted result. Otherwise char '*' will be placed. |
![]() |
inMinSpaceWidth | Optional<int> | 0 - ![]() |
NIL | Minimal distance between characters where space character will be inserted |
![]() |
outCharacters | String& | Result of characters recognition | ||
![]() |
outScores | Array<float>& | Classification result score | ||
![]() |
outCandidates | Array<Array<OcrCandidate> >& | Array of a character classification results and their score | ||
![]() |
diagNormalizedCharacters | Array<Image>& | Images of normalized characters used in character recognition | ||
![]() |
diagCharactersBoxes | Array<Box>& | Bounding boxes of characters |
Description
The operation recognizes characters from given regions using trained OcrMlpModel.
This operation requires trained MLP classifier provided in the inOcrModel input. For further details about creating and learning fonts please refer to the documentation of filters InitOcr_MLP_Deprecated and TrainOcr_MLP_Deprecated.
Filter requires regions specified in the inCharacterRegions. Each of the input region must contain single character. To separate characters in the region use SplitRegionIntoExactlyNCharacters or SplitRegionIntoMultipleCharacters.
The inCharacterSorting parameter defines the sorting order of the input characters provided in inCharacterRegions.
The parameter inDotPrint turns on the dedicated smoothing for characters printed using jet printer in dot-matrix form.
The parameter inCharacterSize defines size of monospaced (fixed-width) font. If the parameter is set to auto character will be recognized as proportional font. For further information about font types please refer to the documentation of filter TrainOcr_MLP_Deprecated.
The input inMinSpaceWidth value indicates minimal distance between characters where space character will be inserted to result string. When the value is marked as auto no spaces will be inserted.
The output outCharacters contains recognized characters. The recognition score of each recognized character is stored in the outScores.
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 | Invalid OcrMlpModel in RecognizeCharacters_MLP. |
DomainError | Uninitialized OcrMlpModel in RecognizeCharacters_MLP |
See Also
- InitOcr_MLP_Deprecated – Creates an OCR multilayer perceptron model.
- TrainOcr_MLP_Deprecated – Trains an OCR multilayer perceptron classifier.