TTMSFNCWXOCRHelper Class
Visual control that displays an image, lets the user select regions to recognize the text they contain, and overlays recognition feedback with confidence-based highlighting. Exposes the image, recognition engine, confidence thresholds, appearance, and selection behavior as published properties for design-time configuration.
API unit family: TMSFNCWXOCRHelper
Inherits from: TTMSFNCWXOCRCustomHelper
Syntax
TTMSFNCWXOCRHelper = class(TTMSFNCWXOCRCustomHelper)
Properties
| Name | Description |
|---|---|
| Appearance | Styling used for the drag rectangle, selection outlines, and confidence-based word highlights. (inherited from TTMSFNCWXOCRCustomHelper) |
| AutoStart | When True, a selected region is submitted for recognition immediately after the user finishes drawing it; otherwise recognition must be started explicitly. Defaults to False. (inherited from TTMSFNCWXOCRCustomHelper) |
| Bitmap | The source image displayed in the control and from which selected regions are cropped for recognition. (inherited from TTMSFNCWXOCRCustomHelper) |
| EnableFeedback | When True, selection outlines, index labels, and confidence-colored word boxes are drawn over the image. When False, no feedback is rendered. Defaults to True. (inherited from TTMSFNCWXOCRCustomHelper) |
| EnableSelection | When True, the user can draw new selection regions over the image with the mouse. Defaults to True. (inherited from TTMSFNCWXOCRCustomHelper) |
| LowConfidence | Upper bound, as a percentage, of the lowest confidence band. Words whose confidence is below this value are highlighted with the low confidence style. (inherited from TTMSFNCWXOCRCustomHelper) |
| ModerateConfidence | Upper bound, as a percentage, of the middle confidence band. Words at or above the low threshold and below this value are highlighted with the moderate confidence style. (inherited from TTMSFNCWXOCRCustomHelper) |
| OCR | The text recognition engine used to process selected regions. Each engine instance can be attached to only one helper at a time. (inherited from TTMSFNCWXOCRCustomHelper) |
| ReasonableConfidence | Upper bound, as a percentage, of the upper confidence band. Words at or above the moderate threshold and below this value are highlighted with the reasonable confidence style; words at or above this value are treated as reliable and are not highlighted. (inherited from TTMSFNCWXOCRCustomHelper) |
| SelectionResults | The selections currently held by the control, each with its cropped bitmap, position, processing state, and recognition result when available. (inherited from TTMSFNCWXOCRCustomHelper) |
Methods
| Name | Description |
|---|---|
| CheckRectanglesAvailableForOCR | Indicates whether at least one selection is awaiting recognition. (inherited from TTMSFNCWXOCRCustomHelper) |
| ClearAll | Removes all selections and their results, then repaints the control. (inherited from TTMSFNCWXOCRCustomHelper) |
| ClearNonProcessedSelections | Removes only the selections that have neither a result nor a pending recognition request, then repaints the control. Completed and in-progress selections are kept. (inherited from TTMSFNCWXOCRCustomHelper) |
| LoadTemplate | Creates a selection for each region in the supplied template by cropping the corresponding part of the source image, then repaints the control. Use this to reapply a previously saved set of regions. (inherited from TTMSFNCWXOCRCustomHelper) |
| LoadTemplateFromJSON | Deserializes a template from a JSON string and applies its regions to the current image. (inherited from TTMSFNCWXOCRCustomHelper) |
| ResetOCR | Stops the attached recognition engine and clears all selections, then repaints the control. (inherited from TTMSFNCWXOCRCustomHelper) |
| SaveTemplateToJSON | Builds a template from the current selections and serializes it to a JSON string. (inherited from TTMSFNCWXOCRCustomHelper) |
| SaveToTemplate | Builds a template from the current selections so the set of regions can be reused or persisted. (inherited from TTMSFNCWXOCRCustomHelper) |
| StartFullImageOCR | Submits the entire source image as a single selection for recognition. (inherited from TTMSFNCWXOCRCustomHelper) |
| StartOCR | Submits every selection that has not yet been recognized and is not already in progress. When no such selection exists, the full image is submitted instead. (inherited from TTMSFNCWXOCRCustomHelper) |