Read/Verify Text FAQs |
Q: Why is the step not properly recognizing the text inside my region of interest?
Before the Read/Verify Text step can read characters in a region of interest, you need to train the software to recognize the characters. If you have not trained for the characters, click Edit Character Set File on the Main tab to launch the NI OCR Training Interface and train for the characters.
Make sure you selected a Character Set Path from the Main tab that describes the characters you want to read.
Make sure that each character in the region of interest is tightly bounded by a character bounding rectangle. If each character is not bounded, adjust the parameters in the Threshold and Size tabs. In particular, enable the Ignore Objects Touching Region Borders control in the Threshold tab if artifacts touch the character bounding rectangle. Also, adjust the Max Bounding Rect Width in the Size tab if the characters are slanted and slightly overlap in the vertical direction causing one character bounding rectangle to surround all of the characters. Adjusting this parameter forces the width of the character bounding rectangle.
Q: I want the Read/Verify Text step to fail if the text read matches a specific string, but the Limits tab does not allow me to do this. How do I configure for this type of pass/fail?
Insert a Logic Calculator step after the Read/Verify Text step. Perform the following steps to compute this type of pass/fail:
- Do not select any of the limit conditions in the Limits tab of the Read/Verify Text step. The step will always pass.
- Insert a Logic Calculator step. Select the ID measure of the Read/Verify Text step as the first operand.
- Enter the string that should fail the inspection in the Constant control.
- Click Add to add the expression to the Decision table.
- Click Negate.
- Click OK to validate the Logic Calculator step.
You can also use the Calculator step to create a custom decision rule based on the text read.
Q: Why is the step returning a verification score of 0?
In order for the Read/Verify Text step to return the proper verification score for a character, each character class found must have a corresponding reference character in the character set. The reference character is the sample character that the step compares to each found character class. If a reference character has not been specified for all of the found character classes, the algorithm returns a score of 0 for the character classes that do not have a reference character. You can edit the character set file to specify reference characters by clicking the Edit Character Set File button on the Mode tab.
Q: How can I increase the accuracy of the character recognition?
If you know the type of characters that are supposed to be read at a specific location, you can specify a text pattern for the string. Specifying a text pattern limits the possible characters the step looks for when performing character recognition. Complete the following steps to specify a text pattern.
- In the Inspection Steps palette, select the Options tab.
- Select the Use Text Pattern checkbox.
- Click the Specify Text Pattern button to launch the Pattern Setup dialog box.
- In the Pattern Setup dialog box, specify a Type for each character you expect to find. The number of characters you specify should match the length of the string you expect to find.
- Click OK to close the Pattern Setup dialog box.