Train the multi-model. For multi-model training to be successful there must be at least one runnable pattern item in the collection.
Namespace: Cognex.VisionPro.PMAlignA pattern item is runnable if the following 3 conditions are met:
- It is trained
- Has the same coarse and fine grain limits as the CogPMAlignMulti operator, and
- Has the same train algorithm as the CogPMAlignMulti operator. At the start of the training, the trained state will be set to false.
The trained state will be set to true only if training is successful. The train method will throw an exception if training is unsuccessful.
Assembly: Cognex.VisionPro.PMAlign (in Cognex.VisionPro.PMAlign.dll) Version: 73.0.0.0
Syntax
Events
| Event Type | Reason |
|---|---|
| ICogChangedEvent Changed | SfTrained if the operator is trained successfully and SfRunnable for each pattern that was multi-trained successfully. |
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | If training is unsuccessful (no patterns were marked runnable). |
| CogSecurityViolationException | If the security bits are not enabled for the algorithm specified. |
| CogPMAlignImageTypeNotSupported | If the image type of the pattern is not CogImage8Grey. |
See Also