CogOCRMaxClassifierImpl Run Method ( CogOCRMaxChar ,  Boolean ,  Double , CogOCRMaxSwapCharSet, CogOCRMaxClassifierRunParams)Cognex VisionPro
Run the classifier on the input character(s).

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

public CogOCRMaxClassifierLineResult Run(
	CogOCRMaxChar[] runCharacters,
	bool[] isSpace,
	double[] spaceScore,
	CogOCRMaxSwapCharSet swapCharacterSet,
	CogOCRMaxClassifierRunParams runParams
)

Parameters

runCharacters
Type:  Cognex.VisionPro.OCRMax CogOCRMaxChar 
isSpace
Type:  System Boolean 
spaceScore
Type:  System Double 
swapCharacterSet
Type: Cognex.VisionPro.OCRMax CogOCRMaxSwapCharSet
runParams
Type: Cognex.VisionPro.OCRMax CogOCRMaxClassifierRunParams

Return Value

Type: CogOCRMaxClassifierLineResult
Exceptions

ExceptionCondition
CogOCRMaxClassifierParamsException Thrown if:
  • if the collections do not have the same size in the overloads that take multiple collections.
  • any runCharacter's image is not allocated
  • any runCharacter's cellRectImage is not specified
  • runCharacter.Metrics.IsBlank() == true or runCharacter.Key.IsSpace() == true for the overloads that do not take the isSpace parameter.
  • isSpace != runCharacter.key().isSpace() or isSpace != runCharacter.metrics().isBlank() for the overloads that take the isSpace parameter.
CogOCRMaxClassifierNotTrainedException Thrown if if IsTrained()==false.
ObjectDisposedException Thrown if the object is disposed.
ArgumentNullException Thrown if runCharacters is null. Thrown if isSpace is null. Thrown if spaceScore is null. Thrown if swapCharacterSet is null. Thrown if runParams is null.
Remarks

If the input character is to be classified as a space, set isSpace to true and provide a spaceScore within [0, 1].

The classifier ignores spaceScore if isSpace is false.

The classifier throws an exception if the value of isSpace is different from runCharacter.key().isSpace(), or is different from runCharacter.metrics().isBlank().

The overloads that do not take the isSpace parameter are used only for classifying nonspace characters. For each input character, both runCharacter.metrics().isBlank() and runCharacter.key().isSpace() must return false.

See Also