# General

Below is a description of the OCRMaxsettings found under the General tab of the OCRMax Property Sheet.

Parameter | Description
Image | This parameter must reference a spreadsheet cell that contains an Image data structure. By default, this parameter references cell A0 , containing the AcquireImage function. This parameter can also reference other Image data structures, such as those returned by the Image Vision Data Access functions or Coordinate Transforms Functions.
Fixture | Defines the Region of Interest (ROI) relative to a Fixture input or the output of the image coordinate system for the Vision Tools function. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI is rotated or translated in relation to the Fixture. Note: 2D projections use real world units but fixturing with 2D tools requires input in pixel values. When using a 2D projection from a 3D point cloud as a Fixture, convert the real world units to pixel values using the TransWorldToPixel function. The default setting is (0,0,0), the top leftmost corner of the image.
X (default = 0) | The X-offset, in image coordinates.
Y (default = 0) | The Y-offset, in image coordinates.
Theta (default = 0) | The rotation from the image X-axis, in the image coordinate system. (+/-360 degrees clockwise)
Region | Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis. Double-click on the Region parameter to create an Interactive Graphics Mode that you can transform and rotate. Select this parameter and press the Maximize Region button on the Job Edit toolbar of the property sheet to automatically stretch the region to cover the entire image. The X-axis of the ROI should be parallel to the baseline of the text, and the Y-axis should be parallel to the vertical strokes of the characters; if there is no skew, the Y-axis is perpendicular to the X-axis. The positive direction of the X-axis corresponds to the reading direction. Note: The baseline of the text may have any angle (0-360) in the image, as long as the ROI is oriented at approximately the same angle. The ROI should only contain one line of text to be read, and some surrounding background. The background can be noisy and have significant background gradients/shading. In images with text that are clearly printed and have little noise, the ROI may be significantly larger than the line of text. For noisy images, the ROI should be relatively tight around the line of text. Note: The ROI should not contain any other significant features in the image, other than the line of text. For example, the ROI should not partially enclose a different line of nearby text, or the edge of a label. As an approximate rule of thumb, the ROI should be larger than the line of text by at least half a character width on all sides, if possible (i.e. unless a border that large would cause other features to be enclosed within the ROI).
X | The X-offset of the origin, in fixture coordinates.
Y | The Y-offset of the origin, in fixture coordinates.
Width | The dimension along the X-axis of the region.
Height | The dimension along the Y-axis of the region.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the x-axis and the opposing boundary line of the region.
Font | Optionally, specifies a cell reference to a data structure output by another OCRMax function, containing a trained font. Note: If a reference is set, and the trained characters are edited in the function referencing the trained font, the changes to the trained characters will not be undone by Undo Graphic Change under the Edit menu or the Undo button on the standard toolbar.
External Settings | Optionally, specifies a cell reference to a data structure output by an OCRMaxSettings or GetInternalSettings function from OCRMax Vision Data Access functions. If the Export to Cell option has been utilized, this parameter will automatically be set as an absolute cell reference to the newly created OCRMaxSettings function's Settings data structure. Note: If this parameter is set as a reference to an OCRMaxSettings function, the Segmentation parameters will be disabled (use the GetInternalSettings function if the parameters need to remain enabled). Set this parameter to 0 to re-enable the Segmentation parameters. The Auto-Tune Dialog will be unavailable if this parameter is set as a reference to an OCRMaxSettings or GetInternalSettings function from the OCRMax Vision Data Access functions (this parameter must be set to 0 to enable the Auto-Tune dialog).
Train Mode | Specifies the font training behavior.
0 = Add All Characters to Font | When the Train Font parameter is activated, all of the characters in the ROI will be added to the font.
1 = Add New Characters to Font (default) | When the Train Font parameter is activated, only new characters in the ROI will be added to the font.
2 = Replace Trained Characters in Font | When the Train Font parameter is activated, all of the trained characters will be replaced with those currently in the ROI.
3 = Replace Entire Font | When the Train Font parameter is activated, all of the characters in the font will be replaced with those currently in the ROI.
Train String | Specifies the text string to be trained. Note: The OCRMax function only supports training ASCII characters.
Train Font | Specifies the event on which to train the characters, based on the Train Mode parameter setting.
Clear Font | Specifies an event on which all of the characters in the font will be removed. Note: The Train Font and Clear Font parameters can reference the same event, which will initiate the removal of all the characters in the font, and retraining based on the current characters within the ROI.
Inspection Mode | Specifies the inspection mode of the function during run-time.
Read (default) | The function will attempt to read the characters in the ROI, based on trained instances of the characters.
Read/Verify | The function will attempt to first read the characters in the ROI, based on trained instances of the characters, and then verify that the read characters correspond to the text string specified in the Match String parameter.
Match String | Specifies the text string that must be correctly matched when in Read/Verify Inspection Mode. Note: This parameter is only available when the Inspection Mode parameter is set to Read/Verify.
Field String | Specifies the number of characters contained in the character string. Fielding is used to provide information about what characters are expected at different positions in the string. Use the controls in the Fielding tab to construct the Field String and Field Definitions (if necessary). Note: This parameter is only available when the Inspection Mode parameter is set to Read.
Field Definitions | Optionally, the Field Definitions setting can be used to create user-defined entries for the Field String. When included in the Field String, these entries restrict the list of valid characters at the positions in which they are inserted. Use the controls in the Fielding tab to construct the Field String and Field Definitions (if necessary). Note: This parameter is only available when the Inspection Mode parameter is set to Read.
Spaces | Specifies how the function will account for spaces between characters, if necessary. The OCRMax function processes inter-character gaps by classifying them as space characters, and these are user-defined.
Find Spaces | Specifies how the function will handle the insertion of space characters into gaps between other characters.
0 = None (default) | The function will never insert a space character, regardless how large the inter-character gap between characters.
1 = Insert Single Space | The function will insert a single space character per inter-character gap, regardless how large the inter-character gap between characters.
2 = Insert Multiple Spaces | The function will insert x-number (zero or more) of space characters per inter-character gap.
Space Score Mode | Specifies how the function will calculate scores for space characters.
0 = Always Score 100 | Space characters will always receive a score of 100.
1 = Score Based on Clutter (default) | The score of a space character is based on the fraction of pixels that are background; a space character that consists entirely of background pixels will receive a score of 100.
Space Minimum Width | Specifies the minimum width of a space character, in pixels (0 - 1000; default = 10).
Space Maximum Width | Specifies the maximum width of a space character, in pixels (0 - 1000; default = 100).
Accept Threshold | Specifies the minimum acceptable match score (0 to 100; default = 80) for each character. Any character with a match score below the Accept Thresh will fail.
Confusion Threshold | Specifies the minimum difference required between the match scores of the highest scoring character and the second highest scoring character (0 to 40; default = 0).
Use Subsampling | A checkbox which specifies whether or not to enable image subsampling, which decreases character resolution to increase the reading speed of the function.
0 = OFF (default) | Specifies that the function will not perform subsampling.
1 = ON | Specifies that the function will perform subsampling.
Timeout | Specifies the amount of time, in milliseconds (0 to 30000; default = 5000), that the function will search for characters before execution is halted and an #ERR is returned. Setting the value to 0 will disable the setting and a timeout will not be applied.
Output Image Graphic | Specifies the type of output image that should be displayed.
0 = Input Image (default) | The input image will be displayed.
1 = Normalized Image | The normalized image will be displayed.
2 = Binarized Image | The binarized image will be displayed.
Character Label Position | Specifies where to display each character's label in relation to the character region.
0 = Above Character (default) | Each character label will be displayed above the character region.
1 = Right of Character | Each character label will be displayed to the right of the character region.
2 = Below Character | Each character label will be displayed below the character region.
3 = Left of Character | Each character label will be displayed to the left of the character region.
Note: At this point, only the default Above Character Label Position is active. Other options will become available in a future release.
Show Diagnostics | Specifies which type of graphical diagnostic data to display on the image.
0 = hide all (default) | All graphical diagnostic data will be hidden, except when the cell containing the OCRMax function is highlighted in the spreadsheet.
1 = show rejected characters only | Regions around rejected characters will be drawn in red, and the mainline of the text will be enclosed in a blue rectangle.
2 = show kept fragments only | Regions around kept fragments will be drawn in cyan, and the mainline of the text will be enclosed in a blue rectangle.
3 = show rejected fragments only | Regions around rejected fragments will be drawn in yellow, and the mainline of the text will be enclosed in a blue rectangle.
4 = show all | Regions will be drawn around kept characters (green), rejected characters (red), kept fragments (cyan), rejected fragments (yellow), the mainline of the text (blue) and the extended mainline of the text (magenta).
Curved Region Position | Specifies the X and Y coordinates for where the straightened Region will be placed in the image, when a curved Region is used. Note: This parameter is only enabled if the Region parameter Curve value is greater than 0.
X | Specifies the X coordinate where the Region should be positioned.
Y | Specifies the Y coordinate where the Region should be positioned.
Reset | Specifies that the Segmentation tab parameters will be reset to their default settings, clear font information and remove any Auto-Tune record (.rec) files associated with the function. Note: This button is disabled if the External Settings parameter is set as a reference to a GetInternalSettings function fromOCRMax Vision Data Access functions or OCRMaxSettings function.
Show | Specifies which OCRMax graphics overlay the image.
0 = hide all (default) | All graphics will be hidden, except when the cell containing the OCRMax function is highlighted in the spreadsheet.
1 = result graphics only | The character segments, with their corresponding labels, will be displayed at all times.
2 = input graphics only | The input region will be displayed at all times.
3 = show all: input and result graphics | The image region, the output image graphic and the character segments, with their corresponding labels, will be displayed at all times.