Back to FabImage Library website
You are here: Start » Function Reference » Computer Vision » Deep Learning » MergeCharactersIntoLines

MergeCharactersIntoLines
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | DL_OCR |
Converts a output of DL_ReadCharacters to lines of text.
Syntax
void fil::MergeCharactersIntoLines ( const ftl::Array<fil::OcrResult>& inCharacters, float inMaxGap, float inMaxShift, float inMargin, int inMinLength, bool inFlatten, ftl::Array<fil::Rectangle2D >& outLines, ftl::Array <ftl::String >& outStrings, ftl::Array< ftl::Conditional<int> >& outMapping )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inCharacters | const Array<OcrResult>& | Output of DL_ReadCharacters | ||
![]() |
inMaxGap | float | 0.0 - 10.0 | 0.25f | Maximum horizontal gap between joint characters' boxes, denoted as % of 'A' char height |
![]() |
inMaxShift | float | 0.0 - 1.0 | 0.25f | Maximum vertical misalignment between joint character's boxes, denoted as % of 'A' char height |
![]() |
inMargin | float | 0.0 - 10.0 | Additional margin added to result, denoted as % of 'A' char height | |
![]() |
inMinLength | int | 1 - 200 | 1 | Minimal number of chars to create line |
![]() |
inFlatten | bool | False | If True, it concatenates the words on the line into a single result string, otherwise each word is a separate result string | |
![]() |
outLines | Array<Rectangle2D >& | Minimal Box which cover all selected character boxes | ||
![]() |
outStrings | Array <String >& | Text of merged characters | ||
![]() |
outMapping | Array< Conditional<int> >& | Mapping between input characters and output lines, outMapping[i] stores the index line to which inCharacters[i] belongs. If outMapping[i] is NIL it means that inCharacters[i] has not been added to any line |