How do I use the Smart OCR Configurator?

When using actions that read text from an image (such as Find Text in Image) the application uses optical character recognition technology to read the text. This article focuses on adjusting the properties to improve the text recognition.

"Find Text in Image" and "Read Text Into a Variable" actions rely on optical character recognition (OCR) technology to recognize text on the screen. While this technology has improved a lot over the year, it may still need a little help in recognizing the text correctly.

If your OCR action is having issues finding the right text, the first thing to do is to check to see what text it is finding. To do this, click the Open OCR output text button that appears on the step.

OCR Output text

The Debug OCR window appears.

Debug OCR window

You can tell how successful your settings are by the correctness of the text in this window to the actual on screen text. If it isn't correct, you can adjust the properties using the Smart OCR Configurator. To open the Smart OCR Configurator, right-click on the step and select Smart Configurator from the menu.

OCR Configurator

At the bottom of the window you see the image it took of the text area. On the right is the text that it found. From here you can make configuration changes and try them out. Just be sure your application is open with the text you are trying to read displayed on the screen.

Here are the properties that can be changed in the OCR Configurator:

  • OCR type – Auto, Single block, Single Line, Single word. The default is Auto and that should work in most cases for a drop-down list with multiple values.
  • Language a list of various languages currently available for use with the OCR technology. If you need to use a language other than English, it may require an additional download.
  • Scale Factor – the system will automatically calculate a scale factor to use for reading the text in the image. If it isn't finding text correctly, then you can override the calculated setting with a scale factor between 1 and 10. This defaults to 0 but can be set anywhere from 0-10. Where possible, the value should be between 1 and 6. If the text is small, use a scale factor of 1 to start.
  • Match Exact Text – selecting this property indicates the search text must match all of the text found in the image. Note that this setting is only available for the Find Text in Image action.
  • Character Threshold – this is the number of characters that can be off and still make a match. By default, it is set to 0. This means the text to find and the OCR text found must match exactly. If the OCR action is having issues with a character or two you can adjust the number of characters that can be different and still make a match. For example, if you are looking for the text "ID 108764917" and it was having issues correctly recognizing the 9, you could set the Finding Threshold property to 1. This means the text it is looking for and the text it finds can be off by 1 character and still make a successful match. The higher the number, the more characters that can be different and still make a match. Care must be taken when using this property as setting the value too high could result in false positives. Note that this setting is only available for the Find Text in Image action.
  • Include Characters – Small Letters, Capital Letters, Numbers, Special Characters, Other. You can select the characters you want it to find. If you select Other, then enter those characters in the Other text box.
  • Exclude Characters – Small Letters, Capital Letters, Numbers, Special Characters, Other. These are the same choices as Include Characters. However, selecting items here will cause the OCR technology to ignore those characters instead of specifically look for them. For example, if the OCR is reading a slash and you want it to ignore that slash, add the slash (/) character to the Other field under Exclude Characters.
  • OCR Engine – by default, this is set to 3 which should work best in most cases. Other possible values are 0 (legacy engine only), 1 (neural nets LSTM engine only) and 2 (legacy and LSTM engines).
  • Text Area – this is the search area where it searches for the text. If the image in the lower left isn’t the area it should be using to look for the text, click the ellipse button and select the correct area.

You can adjust the properties and then click the Play button to see the impact of the changes on recognizing the text.

If you altered the settings and it is reading the text correctly, click the Apply configurations to action button to save the changes and close the OCR Properties window.