Recognize text (Microsoft)

Description

Recognizes an image text using the Microsoft OCR technology.

Parameters

Path

  1. Set a value: enables you to directly write the desired path. Clicking the 'Pick' button allows you to manually choose the path.

  2. Save the previous step result: chooses the previous function result as a path.

  3. Calculate a value: enables you to use available properties and methods to form a path.

Recognition area

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.

X

  1. Set a value: allows you to specify the horizontal axis coordinate of the top left corner.

  2. Calculate a value: allows you to use available variables, properties and methods to specify the horizontal axis coordinate of the top left corner.

Y

  1. Set a value: allows you to specify the vertical axis coordinate of the top left corner.

  2. Calculate a value: allows you to use available variables, properties and methods to specify the vertical axis coordinate of the top left corner.

Width

  1. Set a value: allows you to specify the rectangle width.

  2. Calculate a value: allows you to use available variables, properties and methods to specify the rectangle width.

Height

  1. Set a value: allows you to specify the rectangle height.

  2. Calculate a value: allows you to use available variables, properties and methods to specify the rectangle height.

Comment

Contains an annotation to the block. The input text will be displayed inside the block above the function name.

Result

To store the recognition result in a variable, a user needs to add the 'Assign value to variable' function 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

Keys and values of an object from the array of objects after recognition
{
"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 function 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.