# Text recognition

An action block that recognizes text in an image, Optical Character Recognition (OCR).

The fiber will pause until the image has been processed and recognition completed.

The result of the text recognition is assigned the output arrays, all having the same length. Each element of the text blocks array is a separate block of text, e.g. a column, footer, address box, etc. An array of confidence scores may be assigned, where each element holds a confidence score for the recognition, a score close to 1 indicate high confidence, 0 low confidence or -1 for score not available. An array of bounding boxes may be assigned, where each element is the bounds of the block of text in the image.

Supported scripts:

- Chinese
- Devanagari
- Japanese
- Korean
- Latin

Machine Learning (ML) data for each script may have to be downloaded before performing such text recognition.

This block requires a device with a working Google Play services installed.

Note! This feature requires Android 5+.

## Input arguments

- Content URI — URI or filename of image content to convert into text blocks.
- Language hint — language hint used to choose the script to support, default is the device language.

## Output variables

- Text blocks — variable to assign an array of recognized text blocks.
- Confidence scores — variable to assign an array of confidence score for each recognized text block, or `null` if unavailable.
- Recognized languages — variable to assign an array of prevailing language used in each block, or `null` if unknown.
- Bounding boxes — variable to assign an array of `[left,top,right,bottom]` bounds of each block, in pixels, or `null` if unavailable.