CogOCRMaxSegmenter Execute Method (CogImage16Range)Cognex VisionPro
Segment one line of characters contained within the image.

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

public CogOCRMaxSegmenterParagraphResult Execute(
	CogImage16Range image
)

Return Value

Type: CogOCRMaxSegmenterParagraphResult
Exceptions

ExceptionCondition
CogSecurityViolationException
CogOCRMaxSegmenterParamsException Thrown if:
  • UseCharacterMaxWidth is true and CharacterMinWidth is greater than CharacterMaxWidth.
  • UseCharacterMaxHeight is true and CharacterMinHeight is greater than CharacterMaxHeight.
  • SpaceParams.SpaceMinWidth is greater than SpaceParams.SpaceMaxWidth.
  • CharacterFramgentMaxDistanceToMainLine is less than 0.0 or greater than 1.0.
  • CharacterFragmentMainLineMinYOverlapFrac is less than 0.0 or greater than 1.0.
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.
NotImplementedException Thrown if LineRefinementMode is set to Classic.
Remarks

Segmentation is performed on the 16 bit grey pixel data after the removal of missing pixels. If the input range image GetMaskData() returns a null visible pixel mask it is assumed that any missing pixels were removed external to the segmenter in a previous step. If the image's visible pixel mask is _not_ null, the segmenter removes the missing pixels using a neighborhood interpolation filter of the image within the region before performing segmentation.

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

The bottom of the image should be approximately parallel to the baseline of the contained line of characters. If the line of characters is severely rotated or skewed use the Execute overload that accepts a region argument.

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