You are here: Start » DLInvoke.DL_ReadCharacters

DLInvoke.DL_ReadCharacters

Performs optical character recognition using a pretrained deep learning model.

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

Syntax

C++
C#
 
public static void DL_ReadCharacters
(
	Avl.Image inImage,
	Optional<Avl.Rectangle2D> inRoi,
	Optional<Avl.CoordinateSystem2D> inRoiAlignment,
	Avl.ReadCharactersModelId inModelId,
	int inCharHeight,
	float inWidthScale,
	float inCharSpacing,
	Optional<string> inCharRange,
	float inMinScore,
	float inMinQuality,
	Avl.Polarity inPolarization,
	float inContrastThreshold,
	bool inCalculateCandidates,
	bool inRemoveBoundaryCharacters,
	List<Avl.OcrResult> outCharacters,
	List<List<Avl.OcrCandidate>> outCandidates,
	List<Avl.Region> outMasks,
	Optional<Avl.Rectangle2D> outAlignedRoi,
	Diagnostic<Avl.Image> diagInputImage
)

Parameters

Name Type Range Default Description
inImageAvl.ImageInput image.
inRoiAtl.Optional<Avl.Rectangle2D>Limits the area where recognized characters are located. Default value: atl::NIL.
inRoiAlignmentAtl.Optional<Avl.CoordinateSystem2D>
inModelIdAvl.ReadCharactersModelIdIdentifier of a Read Characters model. Default value: ().
inCharHeightintAverage height of characters in pixels. 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.
outCharactersSystem.Collections.Generic.List<Avl.OcrResult>
outCandidatesSystem.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<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).
outAlignedRoiAtl.Optional<Avl.Rectangle2D>Input roi after transformation.
diagInputImageAvl.Diagnostic<Avl.Image>Analyzed area of the input image.

See also