Using the OCR Command

Extracts text from the captured images.

Perform the following steps to use the OCR command in a task or MetaBot logic:

Procedure

  1. Expand the OCR node in the Commands tab.
    The system displays the following operations:
    • Capture Window: Capture an entire window as an image.
    • Capture Area: Capture a specific area of an application window.
    • Capture Image by Path: Specify the path of the image that contains the text you want to extract.
    • Capture Image by URL: Specify the URL of the image.
  2. Double-click or drag the operations.
    The system displays the OCR dialog box.
  3. Based on the sub-command you have selected, perform any of the following action:
    • Capture Window: Select the application window you want to capture from the list.
    • Capture Area:
      1. Select the application window in which you want to specify the area to be captured.

        The system displays the Capture Area option.

      2. Click Capture Area to capture area of the selected application window.
    • Capture Image By Path: Specify the location of the image you want to use.
    • Capture Image By URL: Specify the URL of the image you want to use.
    Note: You can press the F2 key to select a variable that you want to use to specify an application window or location of an image.
  4. Select an OCR engine you want to use from the OCR Engine list
  5. Click Advanced Settings.
    The system displays options to specify the threshold of the image.
  6. Select the Enable image pre-processing option if you want the system to adjust gray-scale and contrasts in the captured images
    Or, clear the Enable image pre-processing option and use the Threshold slider to set the threshold value.
    Tip: You can also specify a threshold value in the field.
  7. Click View Captured Text, to view the effect of threshold on the captured image.
    Note: The system does not display captured images for preview in the Image Preview section if you have captured images in the Secure Recording mode.

    See, Secure recording mode for more information.

  8. Select the Filter the capture text option, to filter the captured text.
    The system displays the Before and After fields.

    Specify the text you want to filter out before and after the required text in the Before and After fields respectively.

    For example, if you want to extract 'ABC Inc.' from the captured text 'Name: ABC Inc. Location:', you must specify Location in the Before field and Name in the After field.

  9. Select the Trim the captured text option to trim the extra spaces in the captured text.
  10. Select a variable from the Assign the value to an existing variable list, to assign the captured text to the variable, and then click Save.