Performs search upon the specified image with
the specified run parameters.
Namespace: Cognex.VisionPro.SearchMaxAssembly: Cognex.VisionPro.SearchMax (in Cognex.VisionPro.SearchMax.dll) Version: 93.1.0.0
Syntax
Parameters
- image
- Type: Cognex.VisionPro ICogImage
The image in which to search. May not be NULL.
- searchRegion
- Type: Cognex.VisionPro ICogRegion
The optional search region. If you do not specify a search region, the entire image is searched.
- runParams
- Type: Cognex.VisionPro.SearchMax CogSearchMaxRunParams
The run parameters that specify how to perform this search. May not be NULL.
Return Value
Type: CogSearchMaxResultsExceptions
| Exception | Condition |
|---|---|
| ObjectDisposedException | Thrown if this CogSearchMaxPattern object has already been disposed. |
| ArgumentNullException | Thrown if image is NULL. |
| ArgumentNullException | Thrown if runParams is NULL. |
| InvalidOperationException | Thrown if image is a 8-bit greyscale image, but the pattern was trained using a 24-bit color image, 16-bit grey image, or 16-bit range image. |
| InvalidOperationException | Thrown if image is a 16-bit greyscale or range image, but the pattern was trained using a 24-bit color image or 8-bit grey image. |
| InvalidOperationException | Thrown if image is a 24-bit color image, but the pattern was trained using a 8-bit grey image, 16-bit grey image, or 16-bit range image. |
| InvalidOperationException | Thrown if image is a 24-bit color image, but its color space is not RGB. |
| InvalidOperationException | Thrown if an internal error occurs during running. |
| CogSearchMaxTrainedTemplatesMissingRuntimeDOFsException | Thrown if the pattern was trained using TrainMode CreateDOFTemplates and the trained templates do not allow the tool to search the full range of runtime DOFs enabled in the runparams zones. The traintime templates must incorporate all possible poses in the runtime search. |
| CogSearchMaxImproperMaskException | Thrown if the SearchImageMask is not allocated or contains pixels that have values other than 0 and 255. |
| CogImageNoPixelsException | Thrown if image is not allocated. |
| CogOperatorInvalidRegionException | Thrown if searchRegion falls completely outside of image. |
| CogOperatorNotTrainedException | Thrown if this operator is not already trained. |
| CogSecurityViolationException | Thrown if licensing for this operator cannot be confirmed. |
| CogTimeoutExpiredException | Thrown if the pattern location took longer than the value specified by Timeout. |
See Also