CogOCRMaxSegmenter CharacterMaxHeight Property Cognex VisionPro 9.5
The maximum allowable height of a character's mark rectangle, in pixels. This value is used in two ways. First, this value is used when finding the line as a whole, e.g. to reject vertically adjacent noise and/or other lines of vertically adjacent characters. Second, an individual character whose height exceeds this value will be trimmed to meet this height.

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

public int CharacterMaxHeight { get; set; }

Property Value

Type: Int32
The CharacterMaxHeight value. The default value is 50.
Events

Event TypeReason
ICogChangedEvent Changed

Fires when this property changes.

The following state flag may be affected:

  • SfCharacterMaxHeight
Exceptions

ExceptionCondition
ArgumentOutOfRangeException Thrown if set to a value less than 1 or greater than System::Int32::MaxValue
Remarks

The mark rectangle of a character is a tight bounding box enclosing all of the foreground (e.g. ink) pixels in the character image.

This value is used only if UseCharacterMaxHeight is true.

A tall character may be trimmed to a height below CharacterMaxHeight if the segmenter chooses.

Stage: Refine line, Group, Analyze

Setting this property to a value less than CharacterMinHeight will cause CharacterMinHeight to be adjusted accordingly.

See Also