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 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: 87.1.0.0
Syntax
The CogSearchMaxPattern type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| CogSearchMaxPattern |
Constructs a default CogSearchMaxPattern object.
| |
| CogSearchMaxPattern(CogSearchMaxPattern) |
Constructs a deep copy of the supplied CogSearchMaxPattern object.
| |
| CogSearchMaxPattern(SerializationInfo, StreamingContext) |
Methods
| Name | Description | |
|---|---|---|
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
| Dispose | ||
| Dispose(Boolean) | ||
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
| Execute |
Performs search upon the specified image with
the specified run parameters.
| |
| Finalize | (Overrides Object Finalize .) | |
| GetAttributes |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetClassName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetComponentName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetConverter |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultEvent |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultProperty |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEditor |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| GetObjectData | (Overrides CogSerializableObjectBase GetObjectData(SerializationInfo, StreamingContext).) | |
| GetProperties |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetProperties( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetPropertyOwner |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetTrainedPatternImage |
Gets the image used to train the SearchMax pattern.
This is the smallest possible sub-image of TrainImage that contains
the TrainRegion.
| |
| GetTrainedPatternImageMask |
Gets the actual mask image used to train the current pattern.
| |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
| OnChanged(Int64) |
This method should be called internally whenever the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) | |
| OnChanged(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.) | |
| OnDeserialization | ||
| ResumeAndRaiseChangedEvent |
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.) | |
| SuspendChangedEvent |
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.) | |
| ToString | Returns a String that represents the current Object. (Inherited from Object.) | |
| Train |
Trains the pattern.
| |
| Untrain |
Discards any trained data.
|
Fields
Properties
| Name | Description | |
|---|---|---|
| ChangedEventSuspended |
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.) | |
| CompressionMode |
Gets or sets the compression mode which specifies how the
CogSearchMaxPattern
is trained and run.
| |
| CompressionQuality |
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.
| |
| CvlCompatibilityMode |
Cognex internal use only.
| |
| GrainLimitAutoSelect |
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.
| |
| GrainLimitCoarse |
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.
| |
| GrainLimitFine |
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.
| |
| GranularityMode |
Gets or sets the granularity mode which specifies the
method used to generate the coarse model at a given
granularity or resolution.
| |
| HasChanged | (Inherited from CogSerializableChangedEventBase.) | |
| Origin |
Gets or sets a 6 DOF origin for the pattern. This transform maps
from "Pattern Space" to the selected space of
TrainImage | |
| StateFlags |
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.) | |
| Trained |
Gets whether this pattern has been trained.
| |
| TrainImage |
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.
| |
| TrainImageMask |
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.
| |
| TrainImageMaskOffsetX |
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.
| |
| TrainImageMaskOffsetY |
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.
| |
| TrainMode |
Gets or sets the train mode which specifies how the
CogSearchMaxPattern
is trained.
| |
| TrainRegion |
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.
| |
| TrainRegionMode |
Gets or sets the region mode which specifies how the
TrainRegion
is applied to the
TrainImage.
| |
| TrainTimeout |
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.
| |
| TrainTimeoutEnabled |
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.
| |
| ZoneAngle |
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.
| |
| ZoneScale |
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.
| |
| ZoneScaleX |
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.
| |
| ZoneScaleY |
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.
| |
| ZoneSkew |
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.
|
Events
| Name | Description | |
|---|---|---|
| Changed |
This event is raised when one or more parts of the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) |
See Also