CogSearchMaxPattern ClassCognex VisionPro 9.8
This class is the workhorse of the Cognex.VisionPro.SearchMax assembly; it performs the actual SearchMax search. This class contains the training parameters and trained state information. You can use this class to perform a search, or you can use the tool, CogSearchMaxTool.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation CogSerializableObjectBase
        Cognex.VisionPro.Implementation CogSerializableChangedEventBase
          Cognex.VisionPro.SearchMax CogSearchMaxPattern

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

[SerializableAttribute]
public class CogSearchMaxPattern : CogSerializableChangedEventBase, 
	IDeserializationCallback, IDisposable

The CogSearchMaxPattern type exposes the following members.

Constructors

  NameDescription
Public methodCogSearchMaxPattern 
Constructs a default CogSearchMaxPattern object.
Public methodCogSearchMaxPattern(CogSearchMaxPattern)
Constructs a deep copy of the supplied CogSearchMaxPattern object.
Protected methodCogSearchMaxPattern(SerializationInfo, StreamingContext)
Top
Methods

  NameDescription
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDispose 
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExecute
Performs search upon the specified image with the specified run parameters.
Protected methodFinalize (Overrides Object Finalize .)
Protected methodGetAttributes
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetClassName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetComponentName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetConverter
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultEvent
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultProperty
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEditor
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodGetObjectData (Overrides CogSerializableObjectBase GetObjectData(SerializationInfo, StreamingContext).)
Protected methodGetProperties 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetProperties( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetPropertyOwner
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetTrainedPatternImage
Gets the image used to train the SearchMax pattern. This is the smallest possible sub-image of TrainImage that contains the TrainRegion.
Public methodGetTrainedPatternImageMask
Gets the actual mask image used to train the current pattern.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone 
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Protected methodOnChanged(Int64)
This method should be called internally whenever the object's state may have changed.
(Inherited from CogSerializableChangedEventBase.)
Protected methodOnChanged(CogChangedEventArgs)
This method may be called internally whenever a derived object's state may have changed and the derived object expresses this change via a derived CogChangedEventArgs class.
(Inherited from CogSerializableChangedEventBase.)
Public methodOnDeserialization
Public methodResumeAndRaiseChangedEvent
Re-enables raising of the Changed event after SuspendChangedEvent has been called, and raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.)
Public methodSuspendChangedEvent
Temporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodTrain
Trains the pattern.
Public methodUntrain
Discards any trained data.
Top
Fields

  NameDescription
Public fieldStatic memberSfCompressionMode
Public fieldStatic memberSfCompressionQuality
Public fieldStatic memberSfCvlCompatibilityMode
Public fieldStatic memberSfGetTrainedPatternImage
Public fieldStatic memberSfGetTrainedPatternImageMask
Public fieldStatic memberSfGrainLimitAutoSelect
Public fieldStatic memberSfGrainLimitCoarse
Public fieldStatic memberSfGrainLimitFine
Public fieldStatic memberSfGranularityMode
Protected fieldStatic memberSfNextSf
Public fieldStatic memberSfOrigin
Public fieldStatic memberSfTrained
Public fieldStatic memberSfTrainImage
Public fieldStatic memberSfTrainImageMask
Public fieldStatic memberSfTrainImageMaskOffsetX
Public fieldStatic memberSfTrainImageMaskOffsetY
Public fieldStatic memberSfTrainMode
Public fieldStatic memberSfTrainRegion
Public fieldStatic memberSfTrainRegionMode
Public fieldStatic memberSfTrainTimeout
Public fieldStatic memberSfTrainTimeoutEnabled
Public fieldStatic memberSfZoneAngle
Public fieldStatic memberSfZoneScale
Public fieldStatic memberSfZoneScaleX
Public fieldStatic memberSfZoneScaleY
Public fieldStatic memberSfZoneSkew
Top
Properties

  NameDescription
Public propertyChangedEventSuspended
If nonzero, indicates that the raising of the Changed event has been suspended. This value is incremented when SuspendChangedEvent is called and decremented when ResumeAndRaiseChangedEvent is called.
(Inherited from CogSerializableChangedEventBase.)
Public propertyCompressionMode
Gets or sets the compression mode which specifies how the CogSearchMaxPattern is trained and run.
Public propertyCompressionQuality
Gets or sets the CompressionQuality which specifies how much the lossy compression algorithm will compress the trained image model. This value is ignored if compression mode is not lossy.
Public propertyCvlCompatibilityMode
Cognex internal use only.
Public propertyGrainLimitAutoSelect
Gets or sets whether CogSearchMaxPattern will automatically generate grain limits during training. If false then the values stored in the pattern prior to training will be used.
Public propertyGrainLimitCoarse
Gets or sets the coarse granularity limit. User can manually set the grain limits, but if GrainLimitAutoSelect is true, they will be overwritten by the automatically generated granularity limits. Coarse must be greater than or equal to fine. Setting coarse less than fine will also set fine to the new value.
Public propertyGrainLimitFine
Gets or sets the fine granularity limit. User can manually set the grain limits, but if GrainLimitAutoSelect is true, they will be overwritten by the automatically generated granularity limits. Coarse must be greater than or equal to fine. Setting fine greater than coarse will also set coarse to the new value.
Public propertyGranularityMode
Gets or sets the granularity mode which specifies the method used to generate the coarse model at a given granularity or resolution.
Public propertyHasChanged (Inherited from CogSerializableChangedEventBase.)
Public propertyOrigin
Gets or sets a 6 DOF origin for the pattern. This transform maps from "Pattern Space" to the selected space of TrainImage
Public propertyStateFlags
Returns the complete set of state flags supported on this object. The flags may be indexed by name as shown in the following C# code snippet: if (changedObject.StateFlags["Color"] & eventArgs.StateFlags) { ... }
(Inherited from CogSerializableChangedEventBase.)
Public propertyTrained
Gets whether this pattern has been trained.
Public propertyTrainImage
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.
Public propertyTrainImageMask
Gets or sets the mask that is used when training the CogSearchMaxPattern. The mask allows the user to identify areas of the TrainImage as "Care" (0) or "Don't Care" (255). The mask is aligned to the TrainImage using the TrainImageMaskOffsetX and TrainImageMaskOffsetY values.
Public propertyTrainImageMaskOffsetX
Gets or sets the X offset value in pixels. The X and Y offset values measure the offset from the upper-left corner of the TrainImage to the upper-left corner of the TrainImageMask in image coordinates of the TrainImage.
Public propertyTrainImageMaskOffsetY
Gets or sets the Y offset value in pixels. The X and Y offset values measure the offset from the upper-left corner of the TrainImage to the upper-left corner of the TrainImageMask in image coordinates of the TrainImage.
Public propertyTrainMode
Gets or sets the train mode which specifies how the CogSearchMaxPattern is trained.
Public propertyTrainRegion
Gets or sets the region of interest indicating portion of the TrainImage that will be used to train the pattern. A NULL TrainRegion indicates that the entire TrainImage will be used to train the CogSearchMaxPattern.
Public propertyTrainRegionMode
Gets or sets the region mode which specifies how the TrainRegion is applied to the TrainImage.
Public propertyTrainTimeout
Gets or sets the maximum execution time (msec) allowed to train SearchMax. If SearchMax has not finished training by the end of the timeout period, it will stop soon thereafter and return E_Cog_TimeoutExpired. This value only applies if TrainTimeoutEnabled is true.
Public propertyTrainTimeoutEnabled
Gets or sets whether to enable a train timeout. If true then the execution time of the SearchMax train operation is limited by the TrainTimeout. If false, then timeout is disabled and the TrainTimeout property is ignored.
Public propertyZoneAngle
Gets or sets the zone configuration for the angle degree of freedom for training pattern templates. Units are in Radians. This property is ignored if TrainMode is EvaluateDOFsAtRuntime.
Public propertyZoneScale
Gets or sets the zone configuration for the uniform scale degree of freedom used when training pattern templates. This property is ignored if TrainMode is EvaluateDOFsAtRuntime.
Public propertyZoneScaleX
Gets or sets the zone configuration for the X scale degree of freedom used for training pattern templates. This property is ignored if TrainMode is EvaluateDOFsAtRuntime.
Public propertyZoneScaleY
Gets or sets the zone configuration for the Y scale degree of freedom used for training pattern templates. This property is ignored if TrainMode is EvaluateDOFsAtRuntime.
Public propertyZoneSkew
Gets or sets the zone configuration for the Skew degree of freedom for training pattern templates. Units are in Radians. This property is ignored if TrainMode is EvaluateDOFsAtRuntime.
Top
Events

  NameDescription
Public eventChanged
This event is raised when one or more parts of the object's state may have changed.
(Inherited from CogSerializableChangedEventBase.)
Top
See Also