You are here: Start » AVL.NET » AVL.MergeCharactersIntoLines

AVL.MergeCharactersIntoLines

Converts a output of DL_ReadCharacters to lines of text.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void MergeCharactersIntoLines
(
	IList<AvlNet.OcrResult> inCharacters,
	float inMaxGap,
	float inMaxShift,
	float inMargin,
	int inMinLength,
	bool inFlatten,
	IList<AvlNet.Rectangle2D> outLines,
	IList<string> outStrings,
	IList<int?> outMapping
)

Parameters

Name Type Range Default Description
inCharactersSystem.Collections.Generic.IList<AvlNet.OcrResult>Output of DL_ReadCharacters.
inMaxGapfloat<0.0f, 10.0f>0.25fMaximum horizontal gap between joint characters' boxes, denoted as % of 'A' char height. Default value: 0.25f.
inMaxShiftfloat<0.0f, 1.0f>0.25fMaximum vertical misalignment between joint character's boxes, denoted as % of 'A' char height. Default value: 0.25f.
inMarginfloat<0.0f, 10.0f>Additional margin added to result, denoted as % of 'A' char height.
inMinLengthint<1, 200>1Minimal number of chars to create line. Default value: 1.
inFlattenboolFalseIf True, it concatenates the words on the line into a single result string, otherwise each word is a separate result string. Default value: False.
outLinesSystem.Collections.Generic.IList<AvlNet.Rectangle2D>Minimal Box which cover all selected character boxes.
outStringsSystem.Collections.Generic.IList<string>Text of merged characters.
outMappingSystem.Collections.Generic.IList<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.

See also