You are here: Start » AVL.NET » Function Reference » Computer Vision » Optical Character Recognition » 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 )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inImage | AvlNet.Image | An input image with text. | |||
inRoi | AvlNet.Rectangle2D | Location of the text. | |||
inRoiAlignment | AvlNet.CoordinateSystem2D | Adjusts the region of interest to the position of the inspected object. | |||
inPolarity | AvlNet.Polarity | Text polarity. | |||
inCharWidth | int | <5, 200> | 50 | Width of a single character in pixels. Default value: 50. | |
inStrokeWidth | int? | <1, 50> | Width of the stroke of the letters in pixels. Default value: atl::NIL. | ||
inMinWordGap | int? | <1, 200> | Width of the smallest gap between letters that is to be treated as a space in pixels. Default value: atl::NIL. | ||
outCharacters | System.Collections.Generic.IList<AvlNet.Region> | Regions representing individual characters aligned to the ROI. |
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
- ExtractText2(Image, Rectangle2D, CoordinateSystem2D, Polarity, Int32, IList<Region>)
- ExtractText2(Image, Rectangle2D, CoordinateSystem2D, Polarity, Int32, Nullable<Int32>, Nullable<Int32>, IList<Region>, IList<Region>)