OCR (Optical Character Recognition) in Automation Anywhere RPA

OCR (Optical Character Recognition) 


Image result for automation anywhere ocr

OCR(Optical Character Recognition) is a common technology for reading an image as a text file. Use this command to capture an image or picture, convert it to text, and transfer the data to another application. There are two OCR engines available in Automation Anywhere

  1. TOCR (Tesseract OCR)
  2. MODI (Microsoft Office Document Imaging)

User should specify the OCR engine either TOCR or MODI to work with OCR.

NOTE: By default MODI is selected . However, TOCR will be default engine, if both installed.

System requirements to use OCR command in AA:
1. The OCR command requires that Microsoft Office 2003 or later be installed on the computer.

2. For Microsoft Office 2007, ensure that the sub-component “Scanning, OCR, Indexing Service Filter” (under Microsoft Office Document Imaging) is selected during installation.

3. If using Microsoft Office 2010 and above, you will be required to install the MODI component separately.

4. Since TOCR is a third party component, ensure it is installed separately.

NOTE: More than one OCR engine is installed to your system, it is recommended that you select the relevant OCR engine to ensure your existing tasks run fine.

Sub-Commands in OCR:
The OCR command provides the following sub-commands:

Capture Window- Use this command to specify an application window as an image.
Capture Area- Use this command to capture a specific area of an application window
Capture Image by Path- Use this command when text that you want to capture is contained in an image that is stored on your local computer or network drive. Specify a path name by typing it or browsing to the path
Capture image by URL- Use this command to capture an image located on a website URL.

Process of using the OCR command in image recognition
1. Specify an image.
2. Select the OCR engine.
3. Set a threshold amount to determine OCR accuracy.
4. Assign the extracted text value in a variable.

Tips:
1.Use the view capture text button and image preview to experiment with the threshold setting to achieve desired results.
2. TOCR is the default OCR engine. MODU requires an additional OCR license.

USING OCR TO INTEGRATE WITH COMMAND LINE FTP

Task Description:
Web and Desktop applications are filled with images that need to be converted to a readable text for certain actions to be performed. OCR technology is used to do just that.

The task below logs into FTP server via DOS and waits to check if logged in successfully. It uses OCR technology to retrieve information from Command Prompt in to readable text to check whether login was successful.

T79.atmx

Note: Save the xls in C: drive, the .atmx file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks

Create a new task
  • Click on New->Task Editor
Insert ‘Open Program/File’ command to open command prompt
  • Type ‘cmd.exe’ in program/file text box.
  • Save the command.
  • Enter necessary keystrokes required to log in to the ftp server.

 Insert Loop command
  • Insert 5 times loop command.
Insert OCR command to capture the text from command prompt.
  • Select window from the drop down.
  • Click on view capture text.
  • Select variable from drop down.
  • Click on save button.
  • Enter if command to check logged in successfully or not.
    • Enter $str$ variable.
    • Select ‘Includes’ operation.
    • Select ‘Fix’ option.
    • Type ‘logged in’ in fix text box.
    • Save the command.
    Enter exit loop command in if condition.
    Save and Run the task.
    When you run this task, all the commands necessary to login to server are entered. It waits for some time to login to server. It uses the OCR technology to check whether login was successful or not.
    Resource Credits : Automation Anywhere Examples

No comments