Assembly: Cognex.VisionPro.CNLSearch (in Cognex.VisionPro.CNLSearch.dll) Version: 75.0.0.0
Parameters
- inputImage
- Type: Cognex.VisionPro CogImage8Grey
The image to search.
- searchRegion
- Type: Cognex.VisionPro ICogRegion
The region to search. If the region mode specified in runParams is PixelAlignedBoundingBox then clipping is permitted.
- runParams
- Type: Cognex.VisionPro.CNLSearch CogCNLSearchRunParams
An CogCNLSearchRunParams specifying the search parameters.
Return Value
Type: CogCNLSearchResultsA CogCNLSearchResults results collection, sorted in order of decreasing score, containing the results of the search.
| Exception | Condition |
|---|---|
| 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. |
| CogOperatorNotTrainedException | This object has not been Train . |
| CogCNLSearchAlgorithmNotTrainedException | This object has not been trained for the algorithm specified in runParams. |
| CogCNLSearchAccuracyNotTrainedException | This object has not been trained for the accuracy specified in runParams. |
| CogOperatorInvalidRegionException | The selected space of searchRegion is not a valid space in inputImage. |
| CogOperatorInvalidRegionException | The searchRegion lies completely outside of inputImage. |
| CogOperatorInvalidRegionException | The region mode specified in runParams is AffineTransform but the searchRegion does not fall completely within inputImage Note that if the searchRegion falls within 2 or 3 pixels of any edge of inputImage, then this error will occur. |
| CogOperatorInvalidRegionException | The region mode specified in runParams is AffineTransform but searchRegion is not of type CogRectangleAffine. |
| ArgumentException | runParams is NULL. |
| CogCNLSearchTooSmallToSearchException | inputImage or the region mode specified in runParams is too small to contain the pattern. Note that this error condition may be thrown in cases where a partially matched pattern could fit within the image or region. |
| CogCNLSearchInvalidSearchPointException | The supplied starting point for a point search would place the pattern outside of inputImage. Note that this error will properly consider any specified partial-match parameters. |
Run this CNLSearch pattern on the supplied input image and search region using the supplied CogCNLSearchRunParams. A CogCNLSearchResults will be created and filled with CogCNLSearchResult classes in order of decreasing score.
If you have specified a point search, then this function returns a single result object, even if the score for the search is zero.
If an error occurs, then a NULL result object is returned.