ExtractText2


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

Syntax

C++
C#
Python
 
def ExtractText2(
	inImage: Image,
	inRoi: Rectangle2D,
	inRoiAlignment: CoordinateSystem2D,
	inPolarity: Polarity,
	inCharWidth: int,
	/,
	*,
	inStrokeWidth: int | None = None,
	inMinWordGap: int | None = None
)
-> (
	outCharacters: list[Region],
	diagAlignedCharacters: list[Region]
)

Parameters

Name Type Range Default Description
Input value inImage Image An input image with text
Input value inRoi Rectangle2D Location of the text
Input value inRoiAlignment CoordinateSystem2D Adjusts the region of interest to the position of the inspected object
Input value inPolarity Polarity Text polarity
Input value inCharWidth int 5 - 200 Width of a single character in pixels
Input value inStrokeWidth int | None 1 - 50 None Width of the stroke of the letters in pixels
Input value inMinWordGap int | None 1 - 200 None Width of the smallest gap between letters that is to be treated as a space in pixels
Output value outCharacters list[Region] Regions representing individual characters aligned to the ROI
Diagnostic input diagAlignedCharacters list[Region] Regions representing individual characters aligned to the Image