OCR reread

When a document is classified locally for the class, defined OCR settings can be applied per field. The reread option of a simple or a table field is configured in its properties window and you can define a minimum confidence to accept the new OCR results as the new field result.

If an OCR reread profile is assigned to a field, it is read again by that profile, after it is already read with the generic page recognition profile. Typically, reread profiles are more specific because the user knows something about the fields content. E.g. in the page profile, you define characters and digits to be allowed. If a field is extracted that is supposed to contain amounts, it may be helpful to reread that field with a purely numeric OCR profile.

This reread is firing an event to allow an evaluation via script.

FieldName_AfterFieldReread(ByVal pXDoc As CASCADELib.CscXDocument, ByVal pField As CASCADELib.CscXDocField, ByRef pNewText As String, ByVal Conf As Double, ByRef pbReplaceText As Boolean)

The parameter pNewText is the result of the reread that can be changed by script. Conf is reflecting the confidence of the OCR and the flag pbReplaceText controls if the modified text is set to the field result, if the given confidence is higher than in the field properties defined one this flag is initially set to TRUE (accepted as defined by the field reread properties), else it is set to FALSE.

Reread profiles can also be defined for all cells in a table column. The principle is the same, just the event has a different name and partially different parameters.

TableField_AfterCellReread(ByVal pXDoc As CASCADELib.CscXDocument, ByVal pCell As CASCADELib.CscXDocTableCell, ByRef pNewText As String, ByVal Conf As Double, ByRef pbReplaceText As Boolean)


A visual representation of the OCR reread events.