CogPMRedLinePattern TrainImageMask Property Cognex VisionPro 9.22
Gets or sets the mask to be used when training a CogPMRedLine pattern. The mask allows you to identify areas of the train image as "Care" or "Don't Care".

Namespace: Cognex.VisionPro.PMRedLine
Assembly: Cognex.VisionPro.PMRedLine (in Cognex.VisionPro.PMRedLine.dll) Version: 87.0.0.0
Syntax

public CogImage8Grey TrainImageMask { get; set; }

Property Value

Type: CogImage8Grey
The mask for the train image. Default value is null.
Events

Remarks

The train mask is a CogImage8Grey whose pixels must contain a either a value of zero ("Don't Care") or a value of 255 ("Care"). The mask is aligned to the TrainImage as specified by the TrainImageMaskOffsetX and TrainImageMaskOffsetY values.

The train mask prevents parts of the train image from being trained by PMRedLine. Any pixel in the train image that aligns with a "Don't Care" mask pixel will be ignored by PMRedLine. Any pixel in the input image that aligns with a "Care" mask pixel (or no mask pixel at all) will be used by PMRedLine during training.

If you change this value on a trained pattern object, the pattern will become untrained.

See Also