Description
Recognizes an image text using Microsoft OCR technology.
Note. We do not store processed images on our servers.
Prerequisite
To use this activity, the Bot Runner should be connected to the Orchestrator SaaS via a valid access token. For more information about this token connection, read this article.
Microsoft Azure credentials
To work with Microsoft Cloud OCR, you need to log in to the portal and activate the "Computer Vision" product. You can find out how to do this in the product documentation. The parameters required to work with Studio Pro can be found on the "Keys and Endpoint" page. "KEY 1" and "KEY 2" are the subscription keys. You can use any of them in Studio Pro. You can find more about the parameters you need to use in Studio Pro in the next section of this article.
Parameters
Endpoint and Subscription key
You can connect your Microsoft Cloud OCR service account to Studio Pro to work with this activity. Click the "ADD NEW ACCOUNT" button to add your account.
In the appeared window you will see a from for creating an account:
- Service — this field can be filled in any way, it will not affect the operation of this action.
- Login — here you need to specify the
Endpoint
. - Password — here you need to specify the
Subscription Key
.
For testing and development purposes in Studio Pro, you can use the complimentary OCR plan provided by ElectroNeek according to your pricing plan. To use the complimentary plan, select the "Not set" option in the activity parameters.
Please note that since the Bot Runner product is free, no complimentary plan will be used when exporting the bot to .neex format. Thus, to build an attended-automation system you need to specify your account in the OCR service when working with the .neek file, and then export the bot to .neex.
-
Set a value: enables you to directly write the desired path. Clicking the 'Pick' button allows you to manually choose the path.
-
Save the previous step result: chooses the previous activity result as a path.
-
Calculate a value: enables you to use available properties and methods to form a path.
Supported formats:
-
jpg
-
png
-
bmp
-
gif
Maximum file size: 4 MB
Image dimensions must be between 50 x 50 and 4200 x 4200 pixels, and the image cannot be larger than 10 megapixels.
With this option enabled, the OCR engine will try to convert the handwriting from the document to the text format.
If the 'Use recognition area' option is selected the robot will recognize the text inside the specified rectangular area. To set the area, the coordinates of the top left corner must be set as well as the rectangle width and height.
-
Set a value: this allows you to specify the horizontal axis coordinate of the top left corner.
-
Calculate a value: this allows you to use available variables, properties, and methods to specify the horizontal axis coordinate of the top left corner.
-
Set a value: this allows you to specify the vertical axis coordinate of the top left corner.
-
Calculate a value: this allows you to use available variables, properties, and methods to specify the vertical axis coordinate of the top left corner.
-
Set a value: allows you to specify the rectangle width.
-
Calculate a value: allows you to use available variables, properties and methods to specify the rectangle width.
Height
-
Set a value: allows you to specify the rectangle height.
-
Calculate a value: allows you to use available variables, properties and methods to specify the rectangle height.
Contains an annotation to the activity. The input text will be displayed above the activity name.
Result
To store the recognition result in a variable, a user needs to add the 'Assign value to variable' activity after the OCR block, specify the variable name, and choose the 'Save the previous step result' option.
The result is an array of 'key-value' objects. This object contains the following keys and values:
{
"text": "recognized word",
"location": {
"y": "y coordinate of the top left corner of the rectangle with the word",
"x": "x coordinate of the top left corner of the rectangle with the word",
"width": "width of the rectangle with the recognized word",
"height": "height of the rectangle with the recognized word"
},
"language": "language of the document"
}
Usage Examples
This activity may be useful to use in the RPA processes where you have to deal with the text position. Because not only the text itself is being returned but also its coordinates you can make use of this function for the corresponding purposes.
Note: there is a timeout for this activity - 3 seconds. If this time is not enough for the activity to recognize a large document, try splitting it into smaller parts.