CogPatInspectPattern Train Method Cognex VisionPro
Trains this PatInspect pattern. If the pattern is already trained then it will be untrained and retrained.

Namespace: Cognex.VisionPro.PatInspect
Assembly: Cognex.VisionPro.PatInspect (in Cognex.VisionPro.PatInspect.dll) Version: 65.1.0.0
Syntax

public void Train()
Events

Exceptions

ExceptionCondition
CogSecurityViolationException

Security is not enabled for this vision tool. See Resolving Security-Related Error Messages for more information.

CogImageBadSelectedSpaceNameException

The selected space of TrainImage is not a valid space of TrainImage's coordinate space tree.

CogImageBadSelectedSpaceNameException

The selected space name of TrainImage is a nonqualified space name and more than one instance of it exists in the space tree of TrainImage.

CogImageBadSelectedSpaceNameException

The selected space name of TrainImage is not a legal space name.

CogImageNoPixelsException

TrainImage is not allocated.

CogOperatorInvalidRegionException

The selected space of the TrainRegion is not a valid space of the TrainImage.

CogOperatorInvalidRegionException

TrainRegion falls completely outside of TrainImage.

CogOperatorInvalidRegionException

The selected space name of the TrainRegion is a nonqualified space name and more than one instance of it exists in the space tree of TrainImage.

CogOperatorInvalidRegionException

The selected space name of the TrainRegion is not a legal space name.

CogOperatorInvalidRegionException

TrainRegion is some region other than an CogRectangleAffine and TrainRegion is AffineTransform.

CogOperatorInvalidRegionException

TrainRegion is clipped and TrainRegionMode is AffineTransform. Clipping of the TrainRegion is allowed when TrainRegionMode is PixelAlignedBoundingBoxAdjustMask or PixelAlignedBoundingBox.

CogOperatorInvalidRegionException

TrainRegionMode is too close (within 2 or 3 pixels) of TrainImage and TrainRegionMode is AffineTransform.

CogOperatorNoTrainImageException

TrainImage is NULL.

CogPatInspectImageTooSmallException

TrainImage width or height was less than 3 pixels.

Remarks

Trains this PatInspect pattern. If the pattern is already trained then it will be untrained and retrained.

See Also