CogOCRMaxSwapCharSet SetSwapCharacters Method ( CogOCRMaxSwapChar )Cognex VisionPro 9.7
Set the swap characters in this set. Each swap character in this set contains a list of characters which are "swappable" (They appear similar and are hard to distinguish, e.g. '0' (zero) and 'O' (capital oh)).

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

public void SetSwapCharacters(
	params CogOCRMaxSwapChar[] swapCharacters
)

Parameters

swapCharacters
Type:  Cognex.VisionPro.OCRMax CogOCRMaxSwapChar 
An array of CogSwapChars with which to populate the CogOCRMaxSwapCharSet.
Exceptions

ExceptionCondition
CogOCRMaxSwapCharParamsException Thrown if if Degen() is true for any element of swapCharacters.
ObjectDisposedException Thrown if the object is disposed.
ArgumentNullException Thrown if swapCharacters is null.
ArgumentException Thrown if swapCharacters is the empty string.
Remarks

By transitivity, all groups that share a same member character with one another will be merged into a single group.

Calling the setter with an empty array creates an empty set. An empty set means that there are no swappable characters.

The setter will sort the character codes within each group in ascending order.

See Also