CogOCRMaxSegmenter Execute Method (CogImage16Grey,  CogRectangleAffine )Cognex VisionPro
Segment several lines of characters contained within the search regions.

Namespace: Cognex.VisionPro.OCRMax
Assembly: Cognex.VisionPro.OCRMax (in Cognex.VisionPro.OCRMax.dll) Version: 65.1.0.0
Syntax

public CogOCRMaxSegmenterResult Execute(
	CogImage16Grey image,
	CogRectangleAffine[] regions
)

Parameters

image
Type: Cognex.VisionPro CogImage16Grey
The Image from which to segment lines of characters.
regions
Type:  Cognex.VisionPro CogRectangleAffine 
The regions of interest (ROI(s)) of the image from which to segment characters (one line of characters per region).

Return Value

Type: CogOCRMaxSegmenterResult
Exceptions

ExceptionCondition
CogSecurityViolationException
CogOCRMaxSegmenterParamsException Thrown if:
  • any region is entirely outside the image.
  • CharacterFramgentMaxDistanceToMainLine is less than 0.0 or greater than 1.0.
  • CharacterFragmentMainLineMinYOverlapFrac is less than 0.0 or greater than 1.0.
NotImplementedException Thrown if:
  • any region is partially outside the input image.
CogTransformNotLinearException Thrown if:
  • the image contains a non-linear transform.
CogImageAllocatedException Thrown if the image is not allocated.
CogTimeoutExpiredException Thrown if the Timeout expired.
ArgumentNullException Thrown if image is null. Thrown if regions is null.
Remarks

The regions should each contain one line of characters and surrounding featureless, but possibly nonuniform and/or noisy, background; there should be no strong features in the regions other than the one line of characters.

The regions are specified in the selected space coordinates of the input image. The x-axis should be approximately parallel to the baseline of the contained line of characters, with its positive direction pointing along the reading direction. The skew should be the approximate value of the skew of the line of characters.

If AngleHalfRange is greater than zero, the angle of the line will be refined. If SkewHalfRange is greater than zero, the skew of the line will be refined.

See Also