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 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: 75.1.0.0
Syntax
The CogOCVMaxPattern type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| CogOCVMaxPattern | ||
| CogOCVMaxPattern(CogOCVMaxPattern) | ||
| CogOCVMaxPattern(SerializationInfo, StreamingContext) |
Methods
| Name | Description | |
|---|---|---|
| AddText( Int32 ) | Creates a new paragraph and appends it to the end of the current arrangement. | |
| AddText(String) | Creates a new paragraph and appends it to the end of the current arrangement. | |
| AddText( String ) | Creates a new paragraph and appends it to the end of the current arrangement. | |
| AddText( Int32 , CogOCVMaxCharacterIterator) | Inserts one or more characters at the character position specified by the supplied character iterator. | |
| AddText( Int32 , CogOCVMaxLineIterator) | Creates a new line and inserts it at the line position specified by the line iterator. | |
| AddText( Int32 , CogOCVMaxParagraphIterator) | Creates a new paragraph and inserts it in the arrangement at the position specified by the paragraph iterator. | |
| AddText(String, CogOCVMaxCharacterIterator) | Inserts one or more characters at the character position specified by the character iterator. | |
| AddText(String, CogOCVMaxLineIterator) | Creates a new line and inserts it at the line position specified by the line iterator. | |
| AddText(String, CogOCVMaxParagraphIterator) | Creates a new paragraph and inserts it in the arrangement at the position specified by the paragraph iterator. | |
| AddText( String , CogOCVMaxLineIterator) | Creates one or more new lines and inserts them at the line position specified by the line iterator. | |
| AddText( String , CogOCVMaxParagraphIterator) | Creates a new paragraph and inserts it in the arrangement at the position specified by the paragraph iterator. | |
| CreateCharacterIterator(Int32, Int32) | Creates a character iterator that corresponds to the initial character position in the specified line in the specified paragraph. | |
| CreateCharacterIterator(Int32, Int32, Int32) | Creates a character iterator corresponding to the specified character in the specified line in the specified paragraph of the arrangement. | |
| CreateLineIterator(Int32) | Creates a line iterator that corresponds to the initial line position in the specified paragraph of the arrangement. | |
| CreateLineIterator(Int32, Int32) | Creates a line iterator that corresponds to the specified line in the specified paragraph of the arrangement. | |
| 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.) | |
| CreateParagraphIterator | Create a paragraph iterator corresponding to the initial paragraph in the arrangement. | |
| CreateParagraphIterator(Int32) | Creates a paragraph iterator that corresponds to the specified paragraph of the arrangement. | |
| Dispose | ||
| Dispose(Boolean) | ||
| Equals | (Inherited from Object.) | |
| Execute | Performs an inspection 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.) | |
| GetCharacterCount | Gets the number of characters in a line. | |
| 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.) | |
| GetCustomization | Gets the customization string of the specified type. | |
| 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.) | |
| GetDOFRotation | 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. | |
| GetDOFScale | Get a particular attribute (LowerLimit, Nominal, or UpperLimit) of the (uniform) Scale degree of freedom (DOF). Use the selector argument to specify which attribute. | |
| GetDOFScaleX | Get a particular attribute (LowerLimit, Nominal, or UpperLimit) of the ScaleX degree of freedom (DOF). Use the selector argument to specify which attribute. | |
| GetDOFScaleY | Get a particular attribute (LowerLimit, Nominal, or UpperLimit) of the ScaleY degree of freedom (DOF). Use the selector argument to specify which attribute. | |
| GetDOFShear | 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. | |
| 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.) | |
| GetLineCount | Gets the number of lines in a paragraph. | |
| GetObjectData | (Overrides CogSerializableObjectBase GetObjectData(SerializationInfo, StreamingContext).) | |
| GetParagraphCount | Gets the number of paragraphs in the arrangement. | |
| 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.) | |
| GetTunedRunParams | Gets the tuned run parameters. | |
| 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.) | |
| OnCharacterAdded | ||
| OnCharacterChanged | ||
| OnCharacterRemoved | ||
| OnDeserialization | ||
| OnLineAdded | ||
| OnLineChanged | ||
| OnLineRemoved | ||
| OnParagraphAdded | ||
| OnParagraphChanged | ||
| OnParagraphRemoved | ||
| OnTrainProgress | ||
| OnTuneProgress | ||
| RemoveCharacter | Removes the character specified by the supplied character iterator from the arrangement. | |
| RemoveLine | Removes the line specified by the supplied line iterator from the arrangement. | |
| RemoveParagraph | Removes the paragraph specified by the paragraph iterator from the arrangement. | |
| RenderImage | Creates an image that contains a graphical rendering of the entire arrangement. | |
| 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.) | |
| SetCustomization | Sets the customization string for the specified customization type. | |
| SetCustomizationFromFile | Sets the customization string for the specified customization type from the specified file. | |
| SetDOFRotation | 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. | |
| SetDOFScale | Set a particular attribute (LowerLimit, Nominal, or UpperLimit) of the (uniform) Scale degree of freedom (DOF). Use the selector argument to specify which attribute. | |
| SetDOFScaleX | Set a particular attribute (LowerLimit, Nominal, or UpperLimit) of the ScaleX degree of freedom (DOF). Use the selector argument to specify which attribute. | |
| SetDOFScaleY | Set a particular attribute (LowerLimit, Nominal, or UpperLimit) of the ScaleY degree of freedom (DOF). Use the selector argument to specify which attribute. | |
| SetDOFShear | 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. | |
| 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 | (Inherited from Object.) | |
| Train | Trains the current arrangement. | |
| TrainProgressReport | ||
| Tune | Tunes the entire arrangement. | |
| Tune(ArrayList) | Tunes only the paragraphs specified by the supplied array list of zero based paragraph indices. | |
| Tune(Int32) | Tune only the paragraph specified by the supplied zero based paragraph index. | |
| Tune( Int32 ) | Tunes just the paragraphs specified by the supplied array of zero based paragraph indices. | |
| Tune(CogOCVMaxParagraphIterator) | Tunes only the paragraph specified by the paragraph iterator. | |
| TuneProgressReport | ||
| Untrain | Discards any trained data. |
Fields
| Name | Description | |
|---|---|---|
| SfCharacterRegistration | This bit will be set in the EventArgs of a Changed event every time the value returned by CharacterRegistration may have changed. | |
| SfCreateCharacterIterator | This bit will be set in the EventArgs of a Changed event every time the value returned by CreateCharacterIterator may have changed. | |
| SfCreateLineIterator | This bit will be set in the EventArgs of a Changed event every time the value returned by CreateLineIterator may have changed. | |
| SfCreateParagraphIterator | This bit will be set in the EventArgs of a Changed event every time the value returned by CreateParagraphIterator may have changed. | |
| SfCustomization | This bit will be set in the EventArgs of a Changed event every time the value returned by Customization may have changed. | |
| SfDOFEnable | This bit will be set in the EventArgs of a Changed event every time the value returned by DOFEnable may have changed. | |
| SfExpectedDeformationRate | This bit will be set in the EventArgs of a Changed event every time the value returned by ExpectedDeformationRate may have changed. | |
| SfGetCharacterCount | This bit will be set in the EventArgs of a Changed event every time the value returned by GetCharacterCount may have changed. | |
| SfGetDOFRotation | This bit will be set in the EventArgs of a Changed event every time the value returned by GetDOFRotation may have changed. | |
| SfGetDOFScale | This bit will be set in the EventArgs of a Changed event every time the value returned by GetDOFScale may have changed. | |
| SfGetDOFScaleX | This bit will be set in the EventArgs of a Changed event every time the value returned by GetDOFScaleX may have changed. | |
| SfGetDOFScaleY | This bit will be set in the EventArgs of a Changed event every time the value returned by GetDOFScaleY may have changed. | |
| SfGetDOFShear | This bit will be set in the EventArgs of a Changed event every time the value returned by GetDOFShear may have changed. | |
| SfGetLineCount | This bit will be set in the EventArgs of a Changed event every time the value returned by GetLineCount may have changed. | |
| SfGetParagraphCount | This bit will be set in the EventArgs of a Changed event every time the value returned by GetParagraphCount may have changed. | |
| SfGetTunedRunParams | This bit will be set in the EventArgs of a Changed event every time the value returned by GetTunedRunParams may have changed. | |
| SfNextSf | ||
| SfOrigin | This bit will be set in the EventArgs of a Changed event every time the value returned by Origin may have changed. | |
| SfScoreMode | This bit will be set in the EventArgs of a Changed event every time the value returned by ScoreMode 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. | |
| SfTrainTimeout | This bit will be set in the EventArgs of a Changed event every time the value returned by TrainTimeout may have changed. | |
| SfTrainTimeoutEnabled | This bit will be set in the EventArgs of a Changed event every time the value returned by TrainTimeoutEnabled may have changed. | |
| SfTrainTransform | This bit will be set in the EventArgs of a Changed event every time the value returned by TrainTransform may have changed. | |
| SfTuned | This bit will be set in the EventArgs of a Changed event every time the value returned by Tuned may have changed. | |
| SfTunedRunTimeout | This bit will be set in the EventArgs of a Changed event every time the value returned by TunedRunTimeout may have changed. | |
| SfTuneImage | This bit will be set in the EventArgs of a Changed event every time the value returned by TuneImage may have changed. | |
| SfTuneRegion | This bit will be set in the EventArgs of a Changed event every time the value returned by TuneRegion may have changed. | |
| SfTuneResult | This bit will be set in the EventArgs of a Changed event every time the value returned by TuneResult may have changed. | |
| SfTuneRunParams | This bit will be set in the EventArgs of a Changed event every time the value returned by TuneRunParams 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.
(Inherited from CogSerializableChangedEventBase.) | |
| CharacterRegistration | Gets or sets the type of registration (fitting) done for each character found. | |
| DOFEnable | 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. | |
| ExpectedDeformationRate | Gets or sets the expected deformation rate of the nonlinear fit used for registration. | |
| HasChanged | (Inherited from CogSerializableChangedEventBase.) | |
| Origin | Gets or sets the origin of the arrangement. | |
| ScoreMode | Gets or sets the mode used to compute the score for each character. | |
| 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. | |
| TrainTimeout | If TrainTimeoutEnabled is True, this is the maximum amount of time in milliseconds that TrainTimeoutEnabledcan run. | |
| TrainTimeoutEnabled | Gets or sets whether the pattern is allowed to time out during training. | |
| TrainTransform | Gets or sets the transformation that specifies the mapping from the synthetically generated training images | |
| Tuned | True if the pattern has been tuned. | |
| TunedRunTimeout | Gets the run timeout value in milliseconds generated during the most recent call to to Tune . | |
| TuneImage | Gets the image used during tuning. | |
| TuneRegion | ||
| TuneResult | Gets the final CogOCVMaxResult generated during the most recent call to Tune . | |
| TuneRunParams | Gets or sets the run parameters used for tuning. |
Events
| Name | Description | |
|---|---|---|
| Changed |
This event is raised when one or more parts of the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) | |
| CharacterAdded | ||
| CharacterChanged | ||
| CharacterRemoved | ||
| LineAdded | ||
| LineChanged | ||
| LineRemoved | ||
| ParagraphAdded | ||
| ParagraphChanged | ||
| ParagraphRemoved | ||
| TrainProgress | ||
| TuneProgress |
See Also