Assembly: Cognex.VisionPro.OCRMax (in Cognex.VisionPro.OCRMax.dll) Version: 69.0.0.0
Implements
ICogTool Run| Event Type | Reason |
|---|---|
| ICogTool Running | Fires before the tool runs. |
| ICogChangedEvent Changed | Fires when the tool runs. If the run was successful, results are generated; if the run was not successful, no results are generated and the previous results are cleared. Use RunStatus after CogOCRMaxTool returns or in a event handler to determine whether a run was successful or unsuccessful. The following state flags may be affected: |
| ICogTool Ran | Fires after the tool runs. |
Performs OCRMax analysis on the InputImage using the supplied Segmenter, Classifier, and Fielding. Only the part of the input image contained within Region is searched for text.
The OCRMax Tool runs the OCRMax Segmenter, followed by the OCRMax Classifier, and optionally runs OCRMax Fielding. After running OCRMax, the Tool's result is stored in the Tool's LineResult property.
The Run method is guranteed not to throw an exception. Instead errors and exceptions that occured while running the OCRMax Tool are reflected in the Tool's RunStatus property.
Running the OCRMax Tool may result in a RunStatus error for in the follwing situations.
- Segmenter is null
- Classifier is null
- ClassifierRunParams is null
- Fielding is null
- InputImage is null
- InputImage is not of type CogImage8Grey, CogImage16Grey, or CogImage16Range
- InputImage has not been Allocated
- InputImage is of type CogImage16Range and LineRefinementMode is set to Classic
- The Timeout has expired
- The Region is entirely outside the image
- The Region is partially outside the input image
- The InputImage contains a non-linear transform
- The SwapCharSet is null
- The FieldingDefinitions contains any entries with duplicate Alias fields
For range images, the OCRMax tool automatically replaces missing range image pixels with a neighborhood interpolation filter of the image within the region.