CogOCVPattern Execute Method Cognex VisionPro
Perform an OCV inspection of this pattern at the specified pattern position. A results collection will be created and filled with character position result classes in same the order as the pattern's character positions collection.

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

public CogOCVResults Execute(
	CogImage8Grey inputImage,
	CogOCVPatternPosition patternPosition
)

Parameters

inputImage
Type: Cognex.VisionPro CogImage8Grey

The image in which to verify the pattern.

patternPosition
Type: Cognex.VisionPro.OC CogOCVPatternPosition

The expected pose of the trained pattern in inputImage.

Return Value

Type: CogOCVResults

A CogOCVResults object containing the results of the verification.

Exceptions

ExceptionCondition
CogSecurityViolationException

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

CogOperatorNoInputImageException

inputImage is NULL.

CogImageNoPixelsException

inputImage is not allocated.

ArgumentException

patternPosition is NULL.

CogOperatorNotTrainedException

The pattern is not trained.

CogTimeoutExpiredException

RunTimeTimeout expired.

CogOCVInvalidPatternPositionException

The selected space of the patternPosition is not a valid space of the inputImage's coordinate space tree.

CogOCVInvalidPatternPositionException

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

CogOCVInvalidPatternPositionException

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

CogImageBadSelectedSpaceNameException

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

CogImageBadSelectedSpaceNameException

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

CogImageBadSelectedSpaceNameException

the selected space name of the patternPosition is not a legal space name.

Remarks

Attempts to verify that the pattern of characters specified in this pattern is present in the supplied input image at the specified pose. A results collection is created and filled with results in the same order as the character positions appear in the CharacterPositions collection.

See Also