You are here: Start » DLInvoke.DL_ReadCharacters_Multiple

DLInvoke.DL_ReadCharacters_Multiple

Performs optical character recognition using a pretrained deep learning model on multiple regions of interest.

Namespace:Avl
Assembly:AvlNet.DL.Cpu.dll

Syntax

C++
C#
 
public static void DL_ReadCharacters_Multiple
(
	Avl.Image inImage,
	List<Avl.Rectangle2D> inMultiRoi,
	Optional<Avl.CoordinateSystem2D> inRoiAlignment,
	Avl.ReadCharactersModelId inModelId,
	List<int> inCharHeights,
	float inWidthScale,
	float inCharSpacing,
	Optional<string> inCharRange,
	float inMinScore,
	float inMinQuality,
	Avl.Polarity inPolarization,
	float inContrastThreshold,
	bool inCalculateCandidates,
	bool inRemoveBoundaryCharacters,
	Optional<int> inCanvasWidth,
	Optional<int> inCanvasHeight,
	List<List<Avl.OcrResult>> outCharacters,
	List<List<List<Avl.OcrCandidate>>> outCandidates,
	List<List<Avl.Region>> outMasks,
	List<Avl.Rectangle2D> outAlignedRois,
	Diagnostic<List<Avl.Image>> diagCanvas
)

Parameters

Name Type Range Default Description
inImageAvl.ImageInput image.
inMultiRoiSystem.Collections.Generic.List<Avl.Rectangle2D>Limits the areas where recognized characters are located.
inRoiAlignmentAtl.Optional<Avl.CoordinateSystem2D>
inModelIdAvl.ReadCharactersModelIdIdentifier of a Read Characters model. Default value: ().
inCharHeightsSystem.Collections.Generic.List<int>Average height of characters in pixels for each ROI. Default value: {35}.
inWidthScalefloatScales image width by the given factor. Default value: 1.0f.
inCharSpacingfloatDistance between characters denoted as fraction of inCharHeight. Default value: 0.0f.
inCharRangeAtl.Optional<string>Limits the set of wanted characters. Default value: "A-Z,a-z,0-9,\\\\,/,-".
inMinScorefloatSets a minimum required score for a character to be returned. Default value: 0.5f.
inMinQualityfloatSpecifies the minimum quality threshold a character must meet to be returned. Default value: 0.0f.
inPolarizationAvl.PolaritySets a required polarity for a character to be returned. Default value: Any.
inContrastThresholdfloatSets a threshold for a contrast of found characters. Default value: 0.0f.
inCalculateCandidatesboolIf set to true then outCandidates is calculated. Default value: True.
inRemoveBoundaryCharactersboolIf set to true characters that are not entirely contained in the ROI are filtered out. Default value: False.
inCanvasWidthAtl.Optional<int>Maximum width of internal canvas buffer. If not set, dynamic size mode is used, used only on CUDA execution. Default value: 8192.
inCanvasHeightAtl.Optional<int>Maximum height of internal canvas buffer. If not set, dynamic size mode is used, used only on CUDA execution. Default value: 64.
outCharactersSystem.Collections.Generic.List<System.Collections.Generic.List<Avl.OcrResult>>
outCandidatesSystem.Collections.Generic.List<System.Collections.Generic.List<System.Collections.Generic.List<Avl.OcrCandidate>>>Array of the most likely characters. The first element is the character from outCharacters.
outMasksSystem.Collections.Generic.List<System.Collections.Generic.List<Avl.Region>>Masks of found characters (in Extended model). Contains empty regions in case of using model not supporting masks (in Fast and Balanced model).
outAlignedRoisSystem.Collections.Generic.List<Avl.Rectangle2D>Input rois after transformation.
diagCanvasAvl.Diagnostic<System.Collections.Generic.List<Avl.Image>>Internal canvas images used for OCR.

See also