CogOCRMaxTuneData AutoTune Method Cognex VisionPro
Adds the additional tune record to the tune data and performs an incremental auto tune.

The input record should be verified to be a correct record by the user.

The input record should be a representative example of the image you wish the tuned tool to read.

After calling this function the TuneData will be in the "tuned" state.

When in the tuned state the user can call GetTunedSegmenter(), and GetTunedFont() to extract tuned OCRMax operators.

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

public void AutoTune(
	CogOCRMaxTuneRecord record,
	CogOCRMaxTuneParams tuneParams,
	CogOCRMaxSegmenter segmenter,
	CogOCRMaxClassifierTrainParams classifierTrainParams,
	CogOCRMaxClassifierRunParams classifierRunParams
)

Parameters

record
Type: Cognex.VisionPro.OCRMax CogOCRMaxTuneRecord
A corrected tune record which contains the image, region, correct character codes, as well as the correct mark and cell rectangles.
tuneParams
Type: Cognex.VisionPro.OCRMax CogOCRMaxTuneParams
A CogOCRMaxTuneParams object which controls the AutoTune process.
segmenter
Type: Cognex.VisionPro.OCRMax CogOCRMaxSegmenter
The current CogOCRMaxSegmenter to use as a hint or starting point for the AutoTune process.
classifierTrainParams
Type: Cognex.VisionPro.OCRMax CogOCRMaxClassifierTrainParams
The current CogOCRMaxClassifierTrainParams, this argument is ignored by AutoTune.
classifierRunParams
Type: Cognex.VisionPro.OCRMax CogOCRMaxClassifierRunParams
The current CogOCRMaxClassifierRunParams, this argument is ignored by AutoTune.
Events

Event TypeReason
ICogChangedEvent Changed

Fires when this function is called.

The following state flag may be affected:

  • SfTuned
Exceptions

ExceptionCondition
ArgumentNullException
  • Thrown if record is null.
  • Thrown if tuneParams is null.
  • Thrown if segmenter is null.
  • Thrown if classifierTrainParams is null.
  • Thrown if classifierRunParams is null.
ArgumentException
  • Thrown if record does not contain the same number of CharacterCodes, MarkRects, and CellRects.
CogOCRMaxInvalidTuneRecordException
  • Thrown if the record has an unallocated image
  • Thrown if record contains no character codes
  • Thrown if record character codes contains an unknown character marker
  • Thrown if record has a mark rect which has an angle or skew greater than 45 degrees relative to the region
See Also