CogCNLSearchPattern TrainImageMask Property Cognex VisionPro
A mask which allows the user to identify areas of the pattern as care or don't care. TrainImage pixels that correspond to don't care mask pixels are not trained as part of the pattern. Mask is not supported by the CNLPAS algorithms.

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

public CogImage8Grey TrainImageMask { get; set; }

Property Value

Type: CogImage8Grey
Events

Event TypeReason
CogCNLSearchPattern Changed

Fires when the TrainImageMask 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 TrainImageMask is changed and this pattern becomes untrained.

The following state flag may be affected:

Remarks

A mask which allows the user to identify areas of the pattern as care or don't care. Pixels in the TrainImage that correspond to pixels in the mask image with zero values ("don't care" pixels) are not trained. Pixels in the TrainImage that correspond to pixels in the mask image with nonzero values ("care" pixels) are trained.

Mask images are only supported for the Linear Search algorithm.

The mask image does not need to be the same size as the TrainImage. Any training image pixels not covered by the mask are treated as care pixels. By default, the mask image's upper-left corner is anchored to the training image's upper-left corner. You can specify a different offset using the TrainImageMaskOffsetX and TrainImageMaskOffsetY properties.

Changing the value of this property will untrain this pattern.

Default Value: NULL

See Also