CogOCRMaxSegmenter CharacterMinAspect Property Cognex VisionPro 9.25 SR1
The minimum allowable aspect of a character, where the aspect is defined as the height of the entire line of characters divided by the width of the character's mark rectangle. A character whose aspect is smaller than this value (i.e. whose width is too large) will be split into pieces that are not too wide.

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

public double CharacterMinAspect { get; set; }

Property Value

Type: Double
The CharacterMinAspect value. The default value is 0.8.
Events

Event TypeReason
ICogChangedEvent Changed

Fires when this property changes.

The following state flag may be affected:

  • SfCharacterMinAspect
Exceptions

ExceptionCondition
ArgumentOutOfRangeException Thrown if set to a value less than 0.0 or greater than System::Double::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 UseCharacterMinAspect is true.

The technique used to split the character into pieces depends on the value of WidthType. If WidthType is FontCharWidthTypeFixed, the segmenter will try to break the character into pieces of approximately equal width. If WidthType is FontCharWidthTypeVariable or FontCharWidthTypeUnknown, the segmenter will try to break the character into pieces that are not required to be approximately the same width.

The segmenter may sometimes choose to return characters slightly wider than the width indicated by this value if it cannot find a reasonable split.

CharacterMaxWidth is another way of specifying a maximum character width.

This definition of aspect is more convenient than simply using the height of the character's mark rectangle divided by the width of the character's mark rectangle, e.g. so that allowing a dash "-" does not require using a tiny CharacterMinAspect value.

Stage: Group, Analyze

See Also