OCR

OCR

This activity can be used, when you want to use OCR on specific text section or images to extract the content.

Technical Reference:

 

 

 

EXISTING IMAGE

InputImage: Specify the path of the image to be processed.

InputType: Specify if the given input image is in path or bytes.

TakeExistingImage: Specify true if the bot has to take the existing image for processing.

 

 

 

INPUT

LimitCharacters: It has several options to choose from the drop down.

UseWindowTitle: Check this box if you want to use the window title option.

WindowTitle: Gets auto filled once the image is snipped and saved.

 

 

 

 

 

 

 

 

MISC

Display Name: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes.

SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False.”

True: Continues to execute the workflow irrespective of any error thrown.

False: Stops the workflow if it throws any error

Version: It specifies the version of the smart RPA cognitive feature in use.

OUTPUT

Text: Enter a variable here to get the output in a message box.

PROCESSED IMAGE

ProcessedImage: Specify a path for the processed image to be saved. This is not applicable for single text OCR.

 

 

 

 

REFINEMENT

BgColour: Gets auto filled once the text is snipped and saved.

ConsoleImage: Gets auto filled once the text is snipped and saved.

Language: Gets auto filled once the text is snipped and saved.

ScaleImage: Gets auto filled once the text is snipped and saved.

 

 

 

REGION

Height: Gets auto filled once the text is snipped and saved.

Width: Gets auto filled once the text is snipped and saved.

X: Gets auto filled once the text is snipped and saved.

Y: Gets auto filled once the text is snipped and saved.

* Mandatory fields to execute the workflow.

 

The following activity illustrates on how we can use the OCR activity to extract text from an image file. Here we will be using an image to extract the text using the single text OCR method.

Example:

1.      Keep the image which has the text open on the screen.

2.      Drag and drop the OCR activity to the workflow.

3.      Double click on the activity

4.      Click on snip test position

5.      Snip the text required from the image that is kept open.

6.      Once snipped, the robility OCR wizard window will pop up. Click on save.

7.      Declare a variable in the text box of the output segment.

8.      Drag and drop a writelog activity below the OCR activity.

9.      Enter the same variable declared above in the input string of the write log.

10.   Enter the log level as “info.”

11.   Execute the activity.

 

The bot executes the activity, extracts the text from the given image and displays it in the output box.