Back to Aurora Vision Library website
You are here: Start » Function Reference » Computer Vision » Optical Character Recognition » ExtractText2
ExtractText2
Header: | AVL.h |
---|---|
Namespace: | avl |
Module: | OCR |
Ready-to-use tool for extracting and splitting text elements to single characters.
Syntax
C++
C#
void avl::ExtractText2 ( const avl::Image& inImage, const avl::Rectangle2D& inRoi, const avl::CoordinateSystem2D& inRoiAlignment, const avl::Polarity::Type inPolarity, const int inCharWidth, atl::Optional<int> inStrokeWidth, atl::Optional<int> inMinWordGap, atl::Array<avl::Region>& outCharacters, atl::Array<avl::Region>& diagAlignedCharacters )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inImage | const Image& | An input image with text | |||
inRoi | const Rectangle2D& | Location of the text | |||
inRoiAlignment | const CoordinateSystem2D& | Adjusts the region of interest to the position of the inspected object | |||
inPolarity | const Polarity::Type | Text polarity | |||
inCharWidth | const int | 5 - 200 | 50 | Width of a single character in pixels | |
inStrokeWidth | Optional<int> | 1 - 50 | NIL | Width of the stroke of the letters in pixels | |
inMinWordGap | Optional<int> | 1 - 200 | NIL | Width of the smallest gap between letters that is to be treated as a space in pixels | |
outCharacters | Array<Region>& | Regions representing individual characters aligned to the ROI | |||
diagAlignedCharacters | Array<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. |