You are here: Start » AVL.NET » Invoke.MergeCharactersIntoOneLine

Invoke.MergeCharactersIntoOneLine

Converts the output of the Deep Learning filter DL_ReadCharacters into a single text value, with the detected lines separated by a new line character.

Namespace:Avl
Assembly:AvlNet.dll

Syntax

C++
C#
 
public static void MergeCharactersIntoOneLine
(
	List<Avl.OcrResult> inCharacters,
	float inMaxGap,
	float inMaxShift,
	float inMargin,
	int inMinLength,
	string inPattern,
	Optional<List<List<Avl.OcrCandidate>>> inCandidates,
	float inMinScore,
	Avl.LineDirection inLineDirection,
	out string outText,
	out Avl.Rectangle2D outLine,
	out float outScore,
	List<Conditional<int>> outMapping,
	List<Avl.OcrResult> outProcessedCharacters
)

Parameters

Name Type Range Default Description
inCharactersSystem.Collections.Generic.List<Avl.OcrResult>Output of DL_ReadCharacters.
inMaxGapfloat<0.0f, 10.0f>0.25fMaximum gap between adjacent characters along the reading direction, denoted as fraction of 'A' char height. Default value: 0.25f.
inMaxShiftfloat<0.0f, 1.0f>0.25fMaximum misalignment between adjacent characters perpendicular to the reading direction, denoted as fraction of 'A' char height. Default value: 0.25f.
inMarginfloat<0.0f, 10.0f>Additional margin added to result, denoted as fraction of 'A' char height.
inMinLengthint<1, 200>1Minimal number of chars to create line. Default value: 1.
inPatternstringPattern used in Grammar rules filtering; a new line escape sequence is supported to match across detected lines.
inCandidatesAtl.Optional<System.Collections.Generic.List<System.Collections.Generic.List<Avl.OcrCandidate>>>Candidates - optional output of DL_ReadCharacters, Required when using grammar rules (when inPattern is not empty). Default value: atl::NIL.
inMinScorefloat<0.0f, 1.0f>0.2fMinimum score for filtering the line of text. Default value: 0.2f.
inLineDirectionAvl.LineDirectionHorizontalExpected text orientation direction. Default value: Horizontal.
outTextstringAll merged characters as a single text value, with the detected lines separated by a new line character.
outLineAvl.Rectangle2DMinimal box which covers all selected character boxes.
outScorefloatCalculated score for the whole result.
outMappingSystem.Collections.Generic.List<Atl.Conditional<int>>Mapping between input characters and the output text, outMapping[i] is 0 if inCharacters[i] has been added to the result, NIL otherwise.
outProcessedCharactersSystem.Collections.Generic.List<Avl.OcrResult>Contains the full set of character results after grammar rule processing. Maintains a one-to-one correspondence with inCharacters, preserving original positions but possibly with modified values, scores, or other attributes based on grammar rule application.

See also