CogSearchMaxPattern TrainImage Property Cognex VisionPro 9.8
Gets or sets the train image used to train SearchMax. The TrainRegion and TrainImageMask are applied to this TrainImage in order to define the region and care pixels that will be used to train the pattern. The TrainRegionMode property specifies how TrainRegion will be applied to this image.

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

public ICogImage TrainImage { get; set; }

Property Value

Type: ICogImage
The train image. Default value is NULL.
Events

Event TypeReason
ICogChangedEvent Changed

Fires when this property changes.

The following state flags may be affected:

  • SfTrainImage
  • SfTrained
  • SfGetTrainedPatternImage
  • SfGetTrainedPatternImageMask
Exceptions

ExceptionCondition
ArgumentException Thrown if newVal is a color image, but its color space is not RGB.
ObjectDisposedException Thrown if this CogSearchMaxPattern object has already been disposed.
Remarks

This property is stored as a reference to the supplied image. If you change the value of this property, this CogSearchMaxPattern becomes untrained, but if you change the pixels in the CogImage8Grey that this property refers to, it is not untrained.

Note Changing this property causes this CogSearchMaxPattern to become untrained.

See Also