You are here: Start » AVL.NET » AVL.ExtractText(AvlNet.Image, AvlNet.Rectangle2D, AvlNet.CoordinateSystem2D, AvlNet.TextSegmentation, AvlNet.Region[], AvlNet.Region, AvlNet.Region[], AvlNet.Rectangle2D)
AVL.ExtractText(AvlNet.Image, AvlNet.Rectangle2D, AvlNet.CoordinateSystem2D, AvlNet.TextSegmentation, AvlNet.Region[], AvlNet.Region, AvlNet.Region[], AvlNet.Rectangle2D)
Ready-to-use tool for extracting and splitting character to single characters.
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
public static void ExtractText( AvlNet.Image inImage, AvlNet.Rectangle2D inRoi, AvlNet.CoordinateSystem2D inRoiAlignment, AvlNet.TextSegmentation inSegmentationModel, out AvlNet.Region[] outCharacters, out AvlNet.Region diagTextRegion, out AvlNet.Region[] diagAlignedCharacters, out AvlNet.Rectangle2D diagAlignedRoi )
Parameters
- inImage
- Type: AvlNet.Image
An input image with text - inRoi
- Type: AvlNet.Rectangle2D
Location of the text - inRoiAlignment
- Type: AvlNet.CoordinateSystem2D
Adjusts the region of interest to the position of the inspected object - inSegmentationModel
- Type: AvlNet.TextSegmentation
Model used for separating text from background - outCharacters
- Type: AvlNet.Region
Split characters aligned to ROI - diagTextRegion
- Type: AvlNet.Region
Region of text after extraction - diagAlignedCharacters
- Type: AvlNet.Region
Character regions preserving original image orientation - diagAlignedRoi
- Type: AvlNet.Rectangle2D
ROI rectangle after alignment
Description
This filter distinguish characters from the background using a set of algorithms. This filter performs two steps: text extraction and text segmentation:
- Text extraction – in this step filter uses some basic thresholding methods to get a characters region from the image.
- Text segmentation – split previously found region into separate regions contains character.
Input inRoi should contains only a single line of text.
Remarks
To read more about how to use OCR technique, refer to Machine Vision Guide: Optical Character Recognition
Errors
| Error type | Description |
|---|---|
| DomainError | Invalid thresholding algorithm in ExtractText. |
| DomainError | Invalid splitting algorithm in ExtractText. |
