You are here: Start » AVL.NET » Function Reference » Computer Vision » Optical Character Recognition » AVL.ExtractText2

AVL.ExtractText2

Ready-to-use tool for extracting and splitting text elements to single characters.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void ExtractText2
(
	AvlNet.Image inImage,
	AvlNet.Rectangle2D inRoi,
	AvlNet.CoordinateSystem2D inRoiAlignment,
	AvlNet.Polarity inPolarity,
	int inCharWidth,
	int? inStrokeWidth,
	int? inMinWordGap,
	IList<AvlNet.Region> outCharacters,
	IList<AvlNet.Region> diagAlignedCharacters
)

Parameters

Name Type Range Default Description
inImageAvlNet.ImageAn input image with text.
inRoiAvlNet.Rectangle2DLocation of the text.
inRoiAlignmentAvlNet.CoordinateSystem2DAdjusts the region of interest to the position of the inspected object.
inPolarityAvlNet.PolarityText polarity.
inCharWidthint<5, 200>50Width of a single character in pixels. Default value: 50.
inStrokeWidthint?<1, 50>Width of the stroke of the letters in pixels. Default value: atl::NIL.
inMinWordGapint?<1, 200>Width of the smallest gap between letters that is to be treated as a space in pixels. Default value: atl::NIL.
outCharactersSystem.Collections.Generic.IList<AvlNet.Region>Regions representing individual characters aligned to the ROI.
diagAlignedCharactersSystem.Collections.Generic.IList<AvlNet.Region>Regions representing individual characters aligned to the Image.

Errors

List of possible exceptions:

Error type Description
DomainError inPolarity must be specified as Dark or Bright in ExtractText2.
DomainError inRoi is to narrow to fit a single character in ExtractText2.
DomainError It is impossible for inStrokeWidth to be greater than inCharWidth in ExtractText2.

Function Overrides

See also