CogPatInspectPattern StatisticalTrain Method Cognex VisionPro 9.8 SR1
Statistically incorporates the provided image into the existing pattern. The Pose maps from "Pattern Space" to the selected space of StatisticalTrainImage and is used to align the features of the original TrainImage with the StatisticalTrainImage.

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

public void StatisticalTrain(
	CogImage8Grey statisticalTrainImage,
	CogTransform2DLinear pose
)

Parameters

statisticalTrainImage
Type: Cognex.VisionPro CogImage8Grey

The CogImage8Grey containing the statistically trained image.

pose
Type: Cognex.VisionPro CogTransform2DLinear

The CogTransform2DLinear that maps the alignment region in the input image to the alignment region of the training image.

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 statisticalTrainImage is not a valid space of statisticalTrainImage's coordinate space tree.

CogImageBadSelectedSpaceNameException

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

CogImageBadSelectedSpaceNameException

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

CogImageClippedException

TrainRegion is clipped when mapped onto the statisticalTrainImage or the TrainRegion is too close (within 2 or 3 pixels) to the edge of the statisticalTrainImage.

CogImageNoPixelsException

statisticalTrainImage is not allocated.

CogOperatorNoTrainImageException

statisticalTrainImage is NULL.

CogOperatorNotTrainedException

The pattern is not trained.

ArgumentException

pose is NULL.

Remarks

Statistically incorporates the provided image into the existing pattern. The Pose maps from "Pattern Space" to the selected space of StatisticalTrainImage and is used to align the features of the original TrainImage with the StatisticalTrainImage.

See Also