Creates a ClassifyTrainItem object and adds it to the LabeledImages. returns the image id;.
Assembly: Cognex.Vision.ViDiELClassify.Net (in Cognex.Vision.ViDiELClassify.Net.dll) Version: 9.10.0.0
Syntax
Return Value
Type: StringExceptions
| Exception | Condition |
|---|---|
| ImageException | If the image is not allocated. |
| ImageException | If the image is not Image8Grey or Image24PlanarColor. |
| InternalErrorException | If the supplied image could not subsampled. |
Remarks
This method will perform the following:
- Will call AddImage
- Will try to locate the label, if not found, will call AddClass
- Add a train item using the image id and the class id.
- If the pattern is trained, the pattern will become untrained.
Changed Raised when the value of this property changes. The following state flags may be affected:
See Also