RecognizeCharacters
Classifies input regions into characters. Based on the Multi-Layer Perceptron model.
Applications:Usually the last, yet the most important step of optical character recognition or verification.
Syntax
C++
C#
Python
def RecognizeCharacters( inCharacterRegions: list[Region], inOcrModel: OcrModel, /, *, inCharacterSize: Size | None = None, inDotPrint: bool = False, inCharacterSorting: CharacterSortingOrder = CharacterSortingOrder.LeftToRight, inMinScore: float | None = None, inMinSpaceWidth: int | None = None ) -> ( outCharacters: str, outScores: list[float], outCandidates: list[ list[OcrCandidate] ], diagNormalizedCharacters: list[Image], diagCharactersBoxes: list[Box] )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inCharacterRegions | list[Region] | Array of character regions to recognize | ||
![]() |
inOcrModel | OcrModel | Trained OcrMlpModel used to recognize characters | ||
![]() |
inCharacterSize | Size | None | None | Size of single monospaced character if needed | |
![]() |
inDotPrint | bool | False | Dot-printed characters preprocessing | |
![]() |
inCharacterSorting | CharacterSortingOrder | CharacterSortingOrder.LeftToRight | Sorting order of input characters | |
![]() |
inMinScore | float | None | 0.0 - 1.0 | None | Minimal value of accepted result. Otherwise char '*' will be placed. |
![]() |
inMinSpaceWidth | int | None | 0 - ![]() |
None | Minimal distance between characters where space character will be inserted |
![]() |
outCharacters | str | Result of characters recognition | ||
![]() |
outScores | list[float] | Classification result score | ||
![]() |
outCandidates | list[ list[OcrCandidate] ] | Array of a character classification results and their score | ||
![]() |
diagNormalizedCharacters | list[Image] | Images of normalized characters used in character recognition | ||
![]() |
diagCharactersBoxes | list[Box] | Bounding boxes of characters |




