CogOCVMaxPattern Train Method Cognex VisionPro 9.23
Trains the current arrangement.

Namespace: Cognex.VisionPro.OCVMax
Assembly: Cognex.VisionPro.OCVMax (in Cognex.VisionPro.OCVMax.dll) Version: 91.0.0.0
Syntax

public void Train()
Events

Event TypeReason
ICogChangedEvent ChangedFires when the pattern object is modified.
CogOCVMaxPattern TrainProgressFires periodically during training to report training progress and to facilitate optional cancellation of training.
Exceptions

ExceptionCondition
CogTimeoutExpiredExceptionIf TrainTimeoutEnabled is true and the operator does not complete training within TrainTimeout milliseconds, this exception is generated. Note that this exception will also be generated if training is cancelled via the TrainProgress event.
ObjectDisposedExceptionIf this CogOCVMaxPattern object has already been disposed.
CogSecurityViolationExceptionIf licensing for this operator cannot be confirmed.
InvalidOperationExceptionIf an internal error occurs during training.
Remarks

You must train this pattern before you can call Execute(CogImage8Grey, ICogRegion, CogOCVMaxRunParams).
See Also