CogPMRedLinePattern TrainRegion Property Cognex VisionPro 9.8
Gets or sets the train region. Only the portion of the train image that lies within this region will be trained by PMRedLine. If the supplied region object is null, the entire train image will be trained.

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

public ICogRegion TrainRegion { get; set; }

Property Value

Type: ICogRegion
The train region. Default value is a CogRectangleAffine that is interactive and has all graphical DOFs enabled. The rectangle is centered at (0,0) with a width of 100 and a height of 50.
Events

Event TypeReason
ICogChangedEvent Changed Fires when this property changes. The following state flags may be affected:
Remarks

The TrainRegionMode specifies exactly how the train region will be applied to the TrainImage.

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

You can restrict what portions of the training image are trained by PMRedLine. There are two restriction methods you can use:

  • You can exclude one contiguous area of the image using the TrainRegion.
  • You can exclude multiple non-contiguous areas using the TrainImageMask.
You can use none, either, or both of these restriction methods.

See Also