CogID Train Method Cognex VisionPro 9.5
Train the tool.

Namespace: Cognex.VisionPro.ID
Assembly: Cognex.VisionPro.ID (in Cognex.VisionPro.ID.dll) Version: 69.0.0.0
Syntax

public void Train(
	ICogImage image,
	ICogRegion region
)

Parameters

image
Type: Cognex.VisionPro ICogImage
The image containing the symbol(s).
region
Type: Cognex.VisionPro ICogRegion
The Region that specifies the region containing the symbol(s). If the CogRegion is NULL, the entire image is processed.
Exceptions

ExceptionCondition
CogImageBadTypeException If the supplied input image argument is not a CogImage8Grey.
CogOperatorNoInputImageException If the supplied input image argument is null.
ArgumentException If the supplied input image unbound.
ArgumentException If more than one symbol is enabled.
CogSecurityViolationException If licensing for this operator cannot be confirmed.
Remarks

The train method is only supported for 2D symbols.Currently the tool can only be trained for a single 2D symbol.When training is successful, the Trained flag is set to true and the TrainedData will contain the trained information. ///
See Also