OCR/OCV
Refer to the NI OCR Training Interface Help for information about the NI OCR Training Interface controls.
Main Tab
The following controls are available on the Main tab.
- Step Name—Name to give the step.
- Reposition Region of Interest—When enabled, the step dynamically repositions the region of interest based on a coordinate system you built in a previous step.
- Reference Coordinate System—Coordinate system to which you want to link the region of interest.
- Text Read—Displays characters recognized in the region of interest (ROI).
Train Tab
The following controls are available on the Train tab.
- Character Set Path—Path of the character set you want to use to recognize the characters. A character set file contains a unique representation for each trained character, as well as its corresponding value.
- New Character Set File—Creates a new character set file or edits an existing one.
- Annulus Orientation—Becomes available when you select the Annulus ROI tool. Choose one of the following options:
- Baseline Inside—Select this option when the imaginary line on which the bottoms of the letters align is closer to the center of the annulus.
- Baseline Outside—Select this option when the imaginary line on which the bottoms of the letters align is closer to the outside of the annulus.
- Text Read—Displays characters recognized in the region of interest (ROI).
Threshold Tab
The following controls are available on the Threshold tab.
- Mode—Type of threshold you want to perform.
- Fixed Range—Determines the threshold value for the ROI.
- Uniform—Calculates a single threshold value for the ROI.
- Linear—Divides the ROI into the number of blocks you specify, calculates a threshold value for the first and last blocks, and linearly interpolates values for the blocks between the first and last blocks.
- Nonlinear—Divides the ROI into the number of blocks you specify and calculates a threshold value for each block.
- Characters—Specifies the relative intensity value of a character with respect to the background of the image. Use this control to specify if the character set includes light characters on a dark background or dark characters on a light background.
- Range Min—Minimum threshold value.
- Range Max—Maximum threshold value.
- # of Blocks—Number of blocks that the ROI is divided into when you use the Linear or Nonlinear Mode.
- Ignore Objects Touching Region Borders—When enabled, ignores objects that are touching the border of the ROI you drew.
- Remove Small Objects (# of Erosions)—Number of erosions you want to perform to remove small objects from the ROI.
- Text Read—Displays characters recognized in the region of interest (ROI).
Size Tab
The following controls are available on the Size tab.
- Autosplit—When enabled, the step is configured to read slanted characters.
- Min Bounding Rect Width—Minimum width limits, in pixels, for the character bounding rectangle.
- Max Bounding Rect Width—Maximum width limits, in pixels, for the character bounding rectangle.
- Min Bounding Rect Height—Minimum height limits, in pixels, for the character bounding rectangle.
- Max Bounding Rect Height—Maximum height limits, in pixels, for the character bounding rectangle.
- Min Character Size—Minimum size requirements, in pixels, for an object in an ROI to be considered a character that can be trained.
- Max Character Size—Maximum size requirements, in pixels, for an object in an ROI to be considered a character that can be trained.
- Min Char Spacing—Minimum amount of space, in pixels, that can be between characters in the ROI you specified. This value must be greater than Max Element Spacing.
- Max Horizontal Element Spacing—Maximum amount of space, in pixels, that can be between horizontally adjacent elements, such as in dot-matrix objects. This value must be less than Min Char Spacing.
- Max Vertical Element Spacing—Maximum amount of space, in pixels, that can be between vertically adjacent elements.
Read Options Tab
The following controls are available on the Read Options tab.
- Read Strategy—Specifies the criteria to determine if read characters match trained characters.
- Conservative—The step uses extensive criteria to determine if read characters match trained characters.
- Aggressive—The step uses fewer criteria to determine if read characters match trained characters. The Aggressive strategy processes images faster than the Conservative strategy.
- Read Resolution—Level of character detail the step uses to determine if an object matches a trained character.
- Acceptance Level—Value to indicate how closely an object must match a trained character to be a recognized character. The valid range of values is 0 to 1000. A value of 1000 indicates a perfect match between an object and a trained character.
- Substitution Character—Character you want to use for objects that are not yet trained and recognized.
- Aspect Ratio Dependent—Configures the step to read characters whose size is between a range. Specify how much larger or smaller, in percentages, the characters can be compared to the trained character. To maintain performance in the OCR process, limit the difference to ±50. Avoid creating character sets whose characters differ only in height and width. Consider separating the characters into different character sets, using valid characters to restrict trained characters, and enforcing the aspect ratio.
- Aspect Ratio—Specifies how much larger or smaller, in percentages, the characters can be compared to the trained character. To maintain performance in the OCR process, limit the difference to ±50. Avoid creating character sets whose characters differ only in height and width. Consider separating the characters into different character sets, using valid characters to restrict trained characters, and enforcing the aspect ratio.
- Use Text Pattern—Specifies whether you want to define a pattern of characters that you expect read strings to follow.
- Specify Text Pattern—Specifies that the text being read always has the same pattern. You can then instruct the step that the first character expected is a letter, the second character a digit, and so on. Doing so increases the speed and accuracy of recognition.
- Text Read—Text that the step read.
Results
Displays the following information after reading the selected text:
- Classification Score—Indicates how closely a character matched its closest match in the character set. A high value indicates a close match, and a low value indicates a poor match.
- Identification Score—Indicates how closely a character matched the reference character of the class to which it is assigned. A high value indicates a close match, and a low value indicates a poor match.
- Left, Top—X- and y-coordinates of the bounding rectangle surrounding the character in the current ROI.
- Width, Height—Width and height of the character read in the current ROI.