CogOCVPattern Train Method Cognex VisionPro
Trains this OCV pattern. If the pattern is already trained then it will be untrained and retrained.

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

public void Train()
Events

Event TypeReason
CogOCVPattern Changed

Fires when the pattern is trained.

The following state flags may be affected:

Exceptions

ExceptionCondition
CogSecurityViolationException

Security is not enabled for this vision tool. See Resolving Security-Related Error Messages for more information.

CogOCVNoFontException

Font property is set to Nothing.

CogOCFontNotCompiledException

Font is not compiled.

CogOCVNoCharacterPositionsException

The CharacterPositions collection is empty.

CogOCVNoFontModelsException

At least one of the character positions has no font models listed for verification.

CogOCVInvalidFontModelException

One of the character positions has a font model name and instance that is not a member of the font.

CogOCVNoNormalModelsException

The pattern does not contain any nonblank models.

Remarks

Trains this OCV pattern. If the pattern is already trained then it will be untrained and retrained.

See Also