ClassifyPattern Execute Method Cognex VisionPro 9.24

Runs the trained pattern on the input image and returns the result. The object in the input image should have the approximate appearance to the object in the train images with respect to position and orientation.

Namespace: Cognex.Vision.ViDiEL
Assembly: Cognex.Vision.ViDiELClassify.Net (in Cognex.Vision.ViDiELClassify.Net.dll) Version: 9.24.0.0
Syntax

public ClassifyResult Execute(
	IImage image,
	IRegion region
)

Parameters

image
Type: Cognex.Vision IImage
The input image to process. Must be a Image8Grey or Image24PlanarColor.
region
Type: Cognex.Vision IRegion
The region of image to process. Only the pixels which lie within this region will be considered. Supply null to process the entire image.

Return Value

Type: ClassifyResult

A ClassifyResult containing the results of the classification.

Exceptions

ExceptionCondition
OperatorNotTrainedExceptionIf the pattern is not trained.
ImageExceptionIf the supplied image is not allocated.
ImageExceptionIf the supplied image is not an Image8Grey or an Image24PlanarColor.
InternalErrorExceptionIf the supplied image could not subsampled.
SecurityViolationExceptionSecurity is not enabled for this vision tool.
Remarks

the results returned are in descending order with respect to the scores. The first result contains the label and the score.

See Also