Skip to main content

Extract text from an image

Extract the desired text from the image with precision with the help of Extract text.

The extract text option allows users to:

  • Detect text only: This option returns only the image's position. detect_only is an alias of this parameter.
  • Detect and get the text (default): This option returns both the position and the text at the respective location.
note

Instead of getting the output in a traditional CDN URL, you will get a JSON output from the Context API while the CDN URL will return the original image without any modifications.

Output:

The result of the Extract text is a JSON value with multiple keys and values, such as:

{
"data": [
{
"bbox": {
"top": 212,
"left": 225,
"width": 1301,
"height": 144
},
"text": "A NEGATIVE MIND",
"confidence": 0.92
},
...
],
"text": "A NEGATIVE MIND WILL NEVER ....
}
PropertyDescription
dataConsists of multiple text positions and their associated text.
bboxThe text's position (top, left) and dimensions (height, width).
textThe actual text at the given position (bbox).
confidencethe output's accuracy (out of 1)
Is this page useful?