CogOCVMaxPattern Train Method Cognex VisionPro 9.7
Trains the current arrangement.

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

public void Train()
Events

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

ExceptionCondition
InvalidOperationExceptionIf an internal error occurs during training.
ObjectDisposedExceptionIf this CogOCVMaxPattern object has already been disposed.
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.
CogSecurityViolationExceptionIf licensing for this operator cannot be confirmed.
Remarks

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