Provides access to the properties of an OCV pattern and to the results of training the pattern. The pattern must be trained via the Train method prior to performing an OCV inspection which is done by calling the Execute method.
Inheritance Hierarchy
System MarshalByRefObject
Cognex.VisionPro.Implementation CogObjectBase
Cognex.VisionPro.OC CogOCVPattern
Namespace: Cognex.VisionPro.OC
Assembly: Cognex.VisionPro.OC (in Cognex.VisionPro.OC.dll) Version: 65.1.0.0
Syntax
The CogOCVPattern type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| CogOCVPattern | Constructs a new instance of this class. | |
| CogOCVPattern(IntPtr) | Constructs a new instance of this class using com pointer. | |
| CogOCVPattern(CogOCVPattern) | Constructs a new instance of this class as a deep copy of the given instance. |
Methods
| Name | Description | |
|---|---|---|
| Clone | Returns a deep copy of this class instance. Derived classes that implement Clone should override this method; other clients who wish to clone this instance should call ICloneable.Clone. See also CogSerializer.DeepCopyObject | |
| 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 | (Inherited from Object.) | |
| Execute | Perform an OCV inspection of this pattern at the specified pattern position. A results collection will be created and filled with character position result classes in same the order as the pattern's character positions collection. | |
| ExportToCvlArchive | Exports this pattern to the specified CVL archive as a ccOCLineArrangementPtrh. | |
| 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 | ||
| 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.) | |
| 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.) | |
| OnDeserialization | ||
| ResumeAndRaiseChangedEvent | Re-enables raising of the Changed event after SuspendChangedEvent has been called. Also 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. | |
| 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. | |
| ToString | (Inherited from Object.) | |
| Train | Trains this OCV pattern. If the pattern is already trained then it will be untrained and retrained. | |
| Untrain | Untrain this pattern. Releases any saved training data. No effect if this pattern is not currently trained. |
Fields
| Name | Description | |
|---|---|---|
| SfCharacterPositions | This bit will be set in the EventArgs of a Changed event every time the value returned by CharacterPositions may have changed. | |
| SfCharacterRotationUncertainty | This bit will be set in the EventArgs of a Changed event every time the value returned by CharacterRotationUncertainty may have changed. | |
| SfCharacterScalingUncertainty | This bit will be set in the EventArgs of a Changed event every time the value returned by CharacterScalingUncertainty may have changed. | |
| SfCharacterTranslationUncertainty | This bit will be set in the EventArgs of a Changed event every time the value returned by CharacterTranslationUncertainty may have changed. | |
| SfFont | This bit will be set in the EventArgs of a Changed event every time the value returned by Font may have changed. | |
| SfRunTimeCharacterAcceptThreshold | This bit will be set in the EventArgs of a Changed event every time the value returned by RunTimeCharacterAcceptThreshold may have changed. | |
| SfRunTimeCharacterConfidenceThreshold | This bit will be set in the EventArgs of a Changed event every time the value returned by RunTimeCharacterConfidenceThreshold may have changed. | |
| SfRunTimeTimeout | This bit will be set in the EventArgs of a Changed event every time the value returned by RunTimeTimeout may have changed. | |
| SfRunTimeTimeoutEnabled | This bit will be set in the EventArgs of a Changed event every time the value returned by RunTimeTimeoutEnabled may have changed. | |
| SfTrained | This bit will be set in the EventArgs of a Changed event every time the value returned by Trained may have changed. |
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. | |
| CharacterPositions | A collection of characters positions to be verified. Each character position in this pattern will indicate which font models should be verified for that position. A character position specifies a font model via the font model's Name and Instance. | |
| CharacterRotationUncertainty | A common rotation (in radians) uncertainty for any character position that has its UsePatternCharacterUncertainties set to true. The rotation uncertainty specifies the expected image-to-image variation of a character's rotation. This is an unsigned value. | |
| CharacterScalingUncertainty | A common scaling uncertainty for any character position that has its UsePatternCharacterUncertainties set to true. The scaling uncertainty specifies the expected image-to-image variation of a character's scale. This is an unsigned value. | |
| CharacterTranslationUncertainty | A common translation uncertainty for any character position that has its UsePatternCharacterUncertainties set to true. The translation uncertainty specifies the expected image-to-image variation of a character's x,y position. This is an unsigned value. | |
| Font | The font for this OCV pattern. Each character position in this pattern will indicate which of the font's model(s) should be verified for that position. A character position specifies a font model via the font model's Name and Instance. | |
| HasChanged | If true, the serializable state of this object has changed since the last time it was serialized. | |
| RunTimeCharacterAcceptThreshold | A common accept threshold for any character position that has its UsePatternRunTimeCharacterThresholds set to true. The accept threshold specifies the matching score below which a character will fail verification. | |
| RunTimeCharacterConfidenceThreshold | A common confidence threshold for any character position with UsePatternRunTimeCharacterThresholds set to true. A character's matching score must exceed the highest scoring confusing character by the confidence threshold in order to pass verification. | |
| RunTimeTimeout | The maximum execution time (msec) allowed to run an OCV inspection. If OCV has not finished by the end of the timeout period, it will stop soon thereafter and return E_Cog_TimeoutExpired. This value only applies if TimeoutEnabled is true. | |
| RunTimeTimeoutEnabled | If true then the RunTimeTimeout property limits the execution time of the OCV inspection. If false then timeout is disabled and the RunTimeTimeout property is ignored. | |
| Trained | True if the pattern is trained. |
Events
| Name | Description | |
|---|---|---|
| Changed | Occurs when one or more parts of the object's state may have changed. |
Remarks
Interface that provides access to properties of an OCV pattern and to the results of training the pattern. You must train the pattern by calling Train before you can verify characters (by calling Execute(CogImage8Grey, CogOCVPatternPosition)).
See Also