CogOCVMaxPattern ClassCognex VisionPro

This class is the workhorse of the Cognex.VisionPro.OCVMax assembly; it does the actual optical character verification. This class contains the training parameters and trained state information. You can use this class to perform character verifcation, or you can use the tool, CogOCVMaxTool.

Unlike other vision tools that require training, OCVMax does not use a training image or training region. This class's training is based on synthetically generated images produced by CogOCVMaxFont.

Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation CogSerializableObjectBase
        Cognex.VisionPro.Implementation CogSerializableChangedEventBase
          Cognex.VisionPro.OCVMax CogOCVMaxPattern

Namespace: Cognex.VisionPro.OCVMax
Assembly: Cognex.VisionPro.OCVMax (in Cognex.VisionPro.OCVMax.dll) Version: 65.1.0.0
Syntax

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

The CogOCVMaxPattern type exposes the following members.

Constructors

  NameDescription
Public methodCogOCVMaxPattern 
Public methodCogOCVMaxPattern(CogOCVMaxPattern)
Protected methodCogOCVMaxPattern(SerializationInfo, StreamingContext)
Top
Methods

  NameDescription
Public methodAddText( Int32 )
Creates a new paragraph and appends it to the end of the current arrangement.
Public methodAddText(String)
Creates a new paragraph and appends it to the end of the current arrangement.
Public methodAddText( String )
Creates a new paragraph and appends it to the end of the current arrangement.
Public methodAddText( Int32 , CogOCVMaxCharacterIterator)
Inserts one or more characters at the character position specified by the supplied character iterator.
Public methodAddText( Int32 , CogOCVMaxLineIterator)
Creates a new line and inserts it at the line position specified by the line iterator.
Public methodAddText( Int32 , CogOCVMaxParagraphIterator)
Creates a new paragraph and inserts it in the arrangement at the position specified by the paragraph iterator.
Public methodAddText(String, CogOCVMaxCharacterIterator)
Inserts one or more characters at the character position specified by the character iterator.
Public methodAddText(String, CogOCVMaxLineIterator)
Creates a new line and inserts it at the line position specified by the line iterator.
Public methodAddText(String, CogOCVMaxParagraphIterator)
Creates a new paragraph and inserts it in the arrangement at the position specified by the paragraph iterator.
Public methodAddText( String , CogOCVMaxLineIterator)
Creates one or more new lines and inserts them at the line position specified by the line iterator.
Public methodAddText( String , CogOCVMaxParagraphIterator)
Creates a new paragraph and inserts it in the arrangement at the position specified by the paragraph iterator.
Public methodCreateCharacterIterator(Int32, Int32)
Creates a character iterator that corresponds to the initial character position in the specified line in the specified paragraph.
Public methodCreateCharacterIterator(Int32, Int32, Int32)
Creates a character iterator corresponding to the specified character in the specified line in the specified paragraph of the arrangement.
Public methodCreateLineIterator(Int32)
Creates a line iterator that corresponds to the initial line position in the specified paragraph of the arrangement.
Public methodCreateLineIterator(Int32, Int32)
Creates a line iterator that corresponds to the specified line in the specified paragraph of the arrangement.
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 methodCreateParagraphIterator 
Create a paragraph iterator corresponding to the initial paragraph in the arrangement.
Public methodCreateParagraphIterator(Int32)
Creates a paragraph iterator that corresponds to the specified paragraph of the arrangement.
Public methodDispose 
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExecute
Performs an inspection 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.)
Public methodGetCharacterCount
Gets the number of characters in a line.
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.)
Public methodGetCustomization
Gets the customization string of the specified type.
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.)
Public methodGetDOFRotation
Get a particular attribute (LowerLimit, Nominal, or UpperLimit) of the Rotation degree of freedom (DOF). Use the selector argument to specify which attribute. The units of all Rotation attributes are radians.
Public methodGetDOFScale
Get a particular attribute (LowerLimit, Nominal, or UpperLimit) of the (uniform) Scale degree of freedom (DOF). Use the selector argument to specify which attribute.
Public methodGetDOFScaleX
Get a particular attribute (LowerLimit, Nominal, or UpperLimit) of the ScaleX degree of freedom (DOF). Use the selector argument to specify which attribute.
Public methodGetDOFScaleY
Get a particular attribute (LowerLimit, Nominal, or UpperLimit) of the ScaleY degree of freedom (DOF). Use the selector argument to specify which attribute.
Public methodGetDOFShear
Get a particular attribute (LowerLimit, Nominal, or UpperLimit) of the Shear degree of freedom (DOF). Use the selector argument to specify which attribute. The units of all Shear attributes are radians.
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.)
Public methodGetLineCount
Gets the number of lines in a paragraph.
Protected methodGetObjectData (Overrides CogSerializableObjectBase GetObjectData(SerializationInfo, StreamingContext).)
Public methodGetParagraphCount
Gets the number of paragraphs in the arrangement.
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 methodGetTunedRunParams
Gets the tuned run parameters.
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.)
Protected methodOnCharacterAdded
Protected methodOnCharacterChanged
Protected methodOnCharacterRemoved
Public methodOnDeserialization
Protected methodOnLineAdded
Protected methodOnLineChanged
Protected methodOnLineRemoved
Protected methodOnParagraphAdded
Protected methodOnParagraphChanged
Protected methodOnParagraphRemoved
Protected methodOnTrainProgress
Protected methodOnTuneProgress
Public methodRemoveCharacter
Removes the character specified by the supplied character iterator from the arrangement.
Public methodRemoveLine
Removes the line specified by the supplied line iterator from the arrangement.
Public methodRemoveParagraph
Removes the paragraph specified by the paragraph iterator from the arrangement.
Public methodRenderImage
Creates an image that contains a graphical rendering of the entire arrangement.
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 methodSetCustomization
Sets the customization string for the specified customization type.
Public methodSetCustomizationFromFile
Sets the customization string for the specified customization type from the specified file.
Public methodSetDOFRotation
Set a particular attribute (LowerLimit, Nominal, or UpperLimit) of the Rotation degree of freedom (DOF). Use the selector argument to specify which attribute. The units of all Rotation attributes are radians.
Public methodSetDOFScale
Set a particular attribute (LowerLimit, Nominal, or UpperLimit) of the (uniform) Scale degree of freedom (DOF). Use the selector argument to specify which attribute.
Public methodSetDOFScaleX
Set a particular attribute (LowerLimit, Nominal, or UpperLimit) of the ScaleX degree of freedom (DOF). Use the selector argument to specify which attribute.
Public methodSetDOFScaleY
Set a particular attribute (LowerLimit, Nominal, or UpperLimit) of the ScaleY degree of freedom (DOF). Use the selector argument to specify which attribute.
Public methodSetDOFShear
Set a particular attribute (LowerLimit, Nominal, or UpperLimit) of the Shear degree of freedom (DOF). Use the selector argument to specify which attribute. The units of all Shear attributes are radians.
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 current arrangement.
Public methodTrainProgressReport
Public methodTune 
Tunes the entire arrangement.
Public methodTune(ArrayList)
Tunes only the paragraphs specified by the supplied array list of zero based paragraph indices.
Public methodTune(Int32)
Tune only the paragraph specified by the supplied zero based paragraph index.
Public methodTune( Int32 )
Tunes just the paragraphs specified by the supplied array of zero based paragraph indices.
Public methodTune(CogOCVMaxParagraphIterator)
Tunes only the paragraph specified by the paragraph iterator.
Public methodTuneProgressReport
Public methodUntrain
Discards any trained data.
Top
Fields

  NameDescription
Public fieldStatic memberSfCharacterRegistration
This bit will be set in the EventArgs of a Changed event every time the value returned by CharacterRegistration may have changed.
Public fieldStatic memberSfCreateCharacterIterator
This bit will be set in the EventArgs of a Changed event every time the value returned by CreateCharacterIterator may have changed.
Public fieldStatic memberSfCreateLineIterator
This bit will be set in the EventArgs of a Changed event every time the value returned by CreateLineIterator may have changed.
Public fieldStatic memberSfCreateParagraphIterator
This bit will be set in the EventArgs of a Changed event every time the value returned by CreateParagraphIterator may have changed.
Public fieldStatic memberSfCustomization
This bit will be set in the EventArgs of a Changed event every time the value returned by Customization may have changed.
Public fieldStatic memberSfDOFEnable
This bit will be set in the EventArgs of a Changed event every time the value returned by DOFEnable may have changed.
Public fieldStatic memberSfExpectedDeformationRate
This bit will be set in the EventArgs of a Changed event every time the value returned by ExpectedDeformationRate may have changed.
Public fieldStatic memberSfGetCharacterCount
This bit will be set in the EventArgs of a Changed event every time the value returned by GetCharacterCount may have changed.
Public fieldStatic memberSfGetDOFRotation
This bit will be set in the EventArgs of a Changed event every time the value returned by GetDOFRotation may have changed.
Public fieldStatic memberSfGetDOFScale
This bit will be set in the EventArgs of a Changed event every time the value returned by GetDOFScale may have changed.
Public fieldStatic memberSfGetDOFScaleX
This bit will be set in the EventArgs of a Changed event every time the value returned by GetDOFScaleX may have changed.
Public fieldStatic memberSfGetDOFScaleY
This bit will be set in the EventArgs of a Changed event every time the value returned by GetDOFScaleY may have changed.
Public fieldStatic memberSfGetDOFShear
This bit will be set in the EventArgs of a Changed event every time the value returned by GetDOFShear may have changed.
Public fieldStatic memberSfGetLineCount
This bit will be set in the EventArgs of a Changed event every time the value returned by GetLineCount may have changed.
Public fieldStatic memberSfGetParagraphCount
This bit will be set in the EventArgs of a Changed event every time the value returned by GetParagraphCount may have changed.
Public fieldStatic memberSfGetTunedRunParams
This bit will be set in the EventArgs of a Changed event every time the value returned by GetTunedRunParams may have changed.
Protected fieldStatic memberSfNextSf
Public fieldStatic memberSfOrigin
This bit will be set in the EventArgs of a Changed event every time the value returned by Origin may have changed.
Public fieldStatic memberSfScoreMode
This bit will be set in the EventArgs of a Changed event every time the value returned by ScoreMode 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.
Public fieldStatic memberSfTrainTimeout
This bit will be set in the EventArgs of a Changed event every time the value returned by TrainTimeout may have changed.
Public fieldStatic memberSfTrainTimeoutEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by TrainTimeoutEnabled may have changed.
Public fieldStatic memberSfTrainTransform
This bit will be set in the EventArgs of a Changed event every time the value returned by TrainTransform may have changed.
Public fieldStatic memberSfTuned
This bit will be set in the EventArgs of a Changed event every time the value returned by Tuned may have changed.
Public fieldStatic memberSfTunedRunTimeout
This bit will be set in the EventArgs of a Changed event every time the value returned by TunedRunTimeout may have changed.
Public fieldStatic memberSfTuneImage
This bit will be set in the EventArgs of a Changed event every time the value returned by TuneImage may have changed.
Public fieldStatic memberSfTuneRegion
This bit will be set in the EventArgs of a Changed event every time the value returned by TuneRegion may have changed.
Public fieldStatic memberSfTuneResult
This bit will be set in the EventArgs of a Changed event every time the value returned by TuneResult may have changed.
Public fieldStatic memberSfTuneRunParams
This bit will be set in the EventArgs of a Changed event every time the value returned by TuneRunParams 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.
(Inherited from CogSerializableChangedEventBase.)
Public propertyCharacterRegistration
Gets or sets the type of registration (fitting) done for each character found.
Public propertyDOFEnable
The degrees of freedom (DOFs) to be searched. There are five degrees of freedom: Rotation, (uniform) Scale, ScaleX, ScaleY, and Shear. Any combination of these (including None) may be searched. If a particular DOF is enabled, the search will be performed between that DOF's LowerLimit and UpperLimit values, otherwise the search will be performed with that DOF's Nominal value.
Public propertyExpectedDeformationRate
Gets or sets the expected deformation rate of the nonlinear fit used for registration.
Public propertyHasChanged (Inherited from CogSerializableChangedEventBase.)
Public propertyOrigin
Gets or sets the origin of the arrangement.
Public propertyScoreMode
Gets or sets the mode used to compute the score for each character.
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 propertyTrainTimeout
If TrainTimeoutEnabled is True, this is the maximum amount of time in milliseconds that TrainTimeoutEnabledcan run.
Public propertyTrainTimeoutEnabled
Gets or sets whether the pattern is allowed to time out during training.
Public propertyTrainTransform
Gets or sets the transformation that specifies the mapping from the synthetically generated training images
Public propertyTuned
True if the pattern has been tuned.
Public propertyTunedRunTimeout
Gets the run timeout value in milliseconds generated during the most recent call to to Tune .
Public propertyTuneImage
Gets the image used during tuning.
Public propertyTuneRegion
Gets or sets the optional region that specifies which portion of the TuneImage is used during tuning. If this property is NULL, the entire TuneImage is used.
Public propertyTuneResult
Public propertyTuneRunParams
Gets or sets the run parameters used for tuning.
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.)
Public eventCharacterAdded
Public eventCharacterChanged
Public eventCharacterRemoved
Public eventLineAdded
Public eventLineChanged
Public eventLineRemoved
Public eventParagraphAdded
Public eventParagraphChanged
Public eventParagraphRemoved
Public eventTrainProgress
Public eventTuneProgress
Top
See Also