CogOCVPattern ClassCognex VisionPro
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 Object
  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

[SerializableAttribute]
public class CogOCVPattern : CogObjectBase, 
	ICogNetInternal, IDisposable, ICloneable, ISerializable, ICogHasChanged, 
	IDeserializationCallback, ICogChangedEvent

The CogOCVPattern type exposes the following members.

Constructors

  NameDescription
Public methodCogOCVPattern 
Constructs a new instance of this class.
Public methodCogOCVPattern(IntPtr)
Constructs a new instance of this class using com pointer.
Public methodCogOCVPattern(CogOCVPattern)
Constructs a new instance of this class as a deep copy of the given instance.
Top
Methods

  NameDescription
Protected methodClone
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
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
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.
Public methodExportToCvlArchive
Exports this pattern to the specified CVL archive as a ccOCLineArrangementPtrh.
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
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 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 methodOnDeserialization
Public methodResumeAndRaiseChangedEvent
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.
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.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodTrain
Trains this OCV pattern. If the pattern is already trained then it will be untrained and retrained.
Public methodUntrain
Untrain this pattern. Releases any saved training data. No effect if this pattern is not currently trained.
Top
Fields

  NameDescription
Public fieldStatic memberSfCharacterPositions
This bit will be set in the EventArgs of a Changed event every time the value returned by CharacterPositions may have changed.
Public fieldStatic memberSfCharacterRotationUncertainty
This bit will be set in the EventArgs of a Changed event every time the value returned by CharacterRotationUncertainty may have changed.
Public fieldStatic memberSfCharacterScalingUncertainty
This bit will be set in the EventArgs of a Changed event every time the value returned by CharacterScalingUncertainty may have changed.
Public fieldStatic memberSfCharacterTranslationUncertainty
This bit will be set in the EventArgs of a Changed event every time the value returned by CharacterTranslationUncertainty may have changed.
Public fieldStatic memberSfFont
This bit will be set in the EventArgs of a Changed event every time the value returned by Font may have changed.
Public fieldStatic memberSfRunTimeCharacterAcceptThreshold
This bit will be set in the EventArgs of a Changed event every time the value returned by RunTimeCharacterAcceptThreshold may have changed.
Public fieldStatic memberSfRunTimeCharacterConfidenceThreshold
This bit will be set in the EventArgs of a Changed event every time the value returned by RunTimeCharacterConfidenceThreshold may have changed.
Public fieldStatic memberSfRunTimeTimeout
This bit will be set in the EventArgs of a Changed event every time the value returned by RunTimeTimeout may have changed.
Public fieldStatic memberSfRunTimeTimeoutEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by RunTimeTimeoutEnabled may have changed.
Public fieldStatic memberSfTrained
This bit will be set in the EventArgs of a Changed event every time the value returned by Trained may have changed.
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.
Public propertyCharacterPositions
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.
Public propertyCharacterRotationUncertainty
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.
Public propertyCharacterScalingUncertainty
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.
Public propertyCharacterTranslationUncertainty
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.
Public propertyFont
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.
Public propertyHasChanged
If true, the serializable state of this object has changed since the last time it was serialized.
Public propertyRunTimeCharacterAcceptThreshold
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.
Public propertyRunTimeCharacterConfidenceThreshold
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.
Public propertyRunTimeTimeout
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.
Public propertyRunTimeTimeoutEnabled
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.
Public propertyTrained
True if the pattern is trained.
Top
Events

  NameDescription
Public eventChanged
Occurs when one or more parts of the object's state may have changed.
Top
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