CogOCRMaxFielding ClassCognex VisionPro
Fielding is the third main step in performing OCRMax.

Fielding takes the Classifier results as an input and outputs a refined set of results based on prior information and expectations of the text being read. For instance, if you know the text being read always start with the letter 'C', fielding can use this information to improve the classifier results.

The Classifier results represent a line of character positions and the scores of different characters at each position.

A user configures the Fielding to provides information about what characters are expected at different positions in the string. Fielding uses this information, and the information in the Classifier results, to make small corrections in situations where the Classifier was unable to make a clear determination of what character was printed at a particular position. Fielding may also use the expected string information to invalidate the classifier result at locations where the classifier found something very different than what was expected by the fielding.

Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation CogSerializableObjectBase
        Cognex.VisionPro.Implementation CogSerializableChangedEventBase
          Cognex.VisionPro.OCRMax CogOCRMaxFielding

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

[SerializableAttribute]
public class CogOCRMaxFielding : CogSerializableChangedEventBase, 
	IDisposable

The CogOCRMaxFielding type exposes the following members.

Constructors

  NameDescription
Public methodCogOCRMaxFielding 
Constructs a new instance of this class.
Public methodCogOCRMaxFielding(String)
Constructs a new instance of this class, and initializes the FieldString property to the supplied value.
Public methodCogOCRMaxFielding(CogOCRMaxFielding)
Constructs a new instance of this class as a deep copy of the given instance.
Protected methodCogOCRMaxFielding(SerializationInfo, StreamingContext)
Serialization constructor for CogOCRMaxFielding object.
Top
Methods

  NameDescription
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 
Destruct this CogOCRMaxFielding object.
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExecute(CogOCRMaxClassifierLineResult)
Perform OCRMax Fielding on the supplied CogOCRMaxClassifierLineResult.
Public methodExecute(CogOCRMaxClassifierLineResult, CogOCRMaxSwapCharSet)
Perform OCRMax Fielding on the supplied CogOCRMaxClassifierLineResult.
Protected methodFinalize
Finalize this CogOCRMaxFielding object.
(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
Implements the GetObjectData method of the ISerializable interface.
(Inherited from CogSerializableObjectBase.)
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 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.)
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 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.)
Top
Fields

  NameDescription
Public fieldStatic memberSfAcceptedMetric
This bit will be set in the EventArgs of a Changed event every time the value returned by AcceptedMetric may have changed.
Public fieldStatic memberSfConfusionMetric
This bit will be set in the EventArgs of a Changed event every time the value returned by ConfusionMetric may have changed.
Public fieldStatic memberSfEscapeCharacter
This bit will be set in the EventArgs of a Changed event every time the value returned by EscapeCharacter may have changed.
Public fieldStatic memberSfEscapeCharacterEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by EscapeCharacterEnabled may have changed.
Public fieldStatic memberSfFieldCount
This bit will be set in the EventArgs of a Changed event every time the value returned by FieldCount may have changed.
Public fieldStatic memberSfFieldingDefinitions
This bit will be set in the EventArgs of a Changed event every time the value returned by FieldingDefinitions may have changed.
Public fieldStatic memberSfFieldString
This bit will be set in the EventArgs of a Changed event every time the value returned by FieldString may have changed.
Public fieldStatic memberSfFirstIndexMax
This bit will be set in the EventArgs of a Changed event every time the value returned by FirstIndexMax may have changed.
Public fieldStatic memberSfIgnoreFailingPrefixSuffix
This bit will be set in the EventArgs of a Changed event every time the value returned by IgnoreFailingPrefixSuffix may have changed.
Public fieldStatic memberSfIgnoreUnfieldedSpaces
This bit will be set in the EventArgs of a Changed event every time the value returned by IgnoreUnfieldedSpaces may have changed.
Public fieldStatic memberSfLastIndexMin
This bit will be set in the EventArgs of a Changed event every time the value returned by LastIndexMin may have changed.
Public fieldStatic memberSfLengthMax
This bit will be set in the EventArgs of a Changed event every time the value returned by LengthMax may have changed.
Public fieldStatic memberSfLengthMin
This bit will be set in the EventArgs of a Changed event every time the value returned by LengthMin may have changed.
Protected fieldStatic memberSfNextSf
Public fieldStatic memberSfVariableLength
This bit will be set in the EventArgs of a Changed event every time the value returned by VariableLength may have changed.
Top
Properties

  NameDescription
Public propertyAcceptedMetric
Get or set how the CogOCRMaxFielding will judge Accepted. Valid choices include "PrimaryMatches" (which does not allow a secondary match to be judged Accepted), and "PrimaryAndSecondaryMatches" (which does allow either Primary or Secondary matches to be judged Accepted). Default is PrimaryAndSecondaryMatches.
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 propertyConfusionMetric
Get or set how the CogOCRMaxFielding will determine confusion, which will be reflected in each CogOCRMaxFieldingPositionResult.PostFieldingClassifierResult's Status, ConfusionCharacter, ConfusionExplanation, and ConfidenceScore. Default is OnlyFieldedCharacters.
Public propertyEscapeCharacter
Get or set the character that may optionally be used to distinguish whether a character in the FieldString should be considered as a possible alias for a fielding definition. If EscapeCharacterEnabled is true and this character is encountered in the FieldString, the next character in the field string will be interpreted literally and will not be evaluated as a possible alias.
Public propertyEscapeCharacterEnabled
Get or set whether the EscapeCharacter should be considered when evaluating the FieldString.
Public propertyFieldCount
Get the number of fielding positions currently defined by the FieldString. Note that the returned value honors the EscapeCharacterEnabled and EscapeCharacter properties.
Public propertyFieldingDefinitions
Get or set the fielding definition collection for this operator. This property may be assigned an empty collection but may not be set to null. Note that a default constructed CogOCRMaxFieldingDefinitionCollection is not empty - it contains a number a predefined aliases.
Public propertyFieldString
Get or set the string that specifies what characters are expected. This string may optionally contain characters that correspond to fielding definition aliases.
Public propertyFirstIndexMax
The fielding subsequences to be considered must start at a position no greater than this index (in the FieldString). This property is ignored if VariableLength is false. Default is 999.
Public propertyHasChanged (Inherited from CogSerializableChangedEventBase.)
Public propertyIgnoreFailingPrefixSuffix
Get or set whether to ignore characters which failed the classification phase (scored below the accept threshold) at the beginning or end of the input string. This can be useful if the input image contains spurious, non-character features at either end of the line of text. Occasionally the segmentation phase will incorrectly identify such spurious features as characters. These spurious characters will fail classification and can be correctly ignored by setting IgnoreFailingPrefixSuffix to true. Default is true.
Public propertyIgnoreUnfieldedSpaces
Get or set whether to ignore/skip spaces in the input string where the corresponding fielding settings for those character settings do not allow spaces. Default is true.
Public propertyLastIndexMin
The fielding subsequences to be considered must end at a position no smaller than this index (in the FieldString). This property is ignored if VariableLength is false. Default is 0.
Public propertyLengthMax
Get or set the maximum acceptable string length, inclusive. This parameter is ignored if VariableLength is false. Note that this setter will enforce LengthMax >= LengthMin by setting LengthMin to equal the new LengthMax if necessary. Default is 999.
Public propertyLengthMin
Get or set the minimum acceptable string length, inclusive. This property is ignored if VariableLength is false. Note that this setter will enforce LengthMin less than or equal to LengthMax by setting LengthMax to equal the new LengthMin if necessary. Default is 1.
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 propertyVariableLength
Get or set whether to run the CogOCRMaxFielding operator in variable-length mode. If false, run in fixed-length mode. Fixed-length mode requires that the classifier result match the field string in its entirety while variable-length allows matching a partial sub-set of the field string. Default is false.
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.)
Top
See Also