Assembly: Cognex.VisionPro.CNLSearch (in Cognex.VisionPro.CNLSearch.dll) Version: 75.1.0.0
Property Value
Type: CogRegionModeConstants| Event Type | Reason |
|---|---|
| CogCNLSearchPattern Changed | Fires when the TrainRegionMode is changed, but the change does cause the pattern to become untrained (because it has not been trained yet). The following state flag may be affected: |
| CogCNLSearchPattern Changed | Fires when the TrainRegionMode is changed and this pattern becomes untrained. The following state flag may be affected: |
| Exception | Condition |
|---|---|
| ArgumentException | The supplied value is not a member of CogRegionModeConstants. |
Specifies how the TrainRegion is applied to the TrainImage.
If you supply an image-aligned CogRectangle, then the region mode has no effect. If you specify PixelAlignedBoundingBox, then all pixels enclosed by a pixel-aligned bounding box around the input region are used for training. If you specify PixelAlignedBoundingBoxAdjustMask and you are using the Linear Search algorithm, then pixels outside of the region are masked as "don't care" pixels. The Linear CNLPAS and Nonlinear CNLPAS algorithms do not support this region mode; if you specify PixelAlignedBoundingBoxAdjustMask, the tool actually uses PixelAlignedBoundingBox.
If you supply a rotated or skewed CogRectangleAffine you have an additional option. If you specify AffineTransform, then the pixels within the region are affine-transformed to produce a new, image-aligned training image. This option can be useful if you know that the search images will be rotated or skewed by a known amount from the training image, although if you can train from an image that resembles the expected search images, you may obtain better results, since the affine transformation resamples the pixels in the acquired image to produce the training image.
The pattern is untrained when you supply a new value for this property.
Default Value: PixelAlignedBoundingBoxAdjustMask