Tesseract icon

Tesseract

Recognize text in images

Extract Boxes

AI-generated

Summary

Extract bounding boxes for text elements at a chosen granularity (paragraphs, lines, words, or characters) from an image or PDF input field.

Inputs

  • Granularity (required) — Level of detail for bounding boxes: paragraphs, lines, words, or characters (symbols). Default is words.
  • Input Image Field Name (required) — Name of the incoming binary field containing the image or PDF to process. Default is 'data'.
  • Detect on Entire Image? (required) — Boolean to specify whether to perform OCR on the entire image or a specified bounding box.
  • Top Y — Top coordinate of the bounding box when not detecting on entire image.
  • Left X — Left coordinate of the bounding box when not detecting on entire image.
  • Width — Width of the bounding box when not detecting on entire image.
  • Height — Height of the bounding box when not detecting on entire image.
  • Options — Additional OCR options including language (default 'eng'), page segmentation mode, resolution settings, character whitelists/blacklists, processing timeout, image resize factor, whether to include processed image binary output, and minimum confidence threshold.

Output shape

A list of output items, each corresponding to an input image or PDF page, containing JSON with an array of text blocks at the specified granularity. Each text block includes text, confidence score, bounding box coordinates, and optionally detected language. The processed image is included as binary data under 'ocr' by default but can be omitted.

Results with confidence below the specified minimum confidence are filtered out. If a timeout occurs during processing, the output JSON for that item marks it as '{ timeout: true }'. Bounding boxes are extracted at the chosen granularity: paragraphs, lines, words, or characters (symbols). When 'Detect on Entire Image?' is false, OCR is performed only on the specified bounding box within the image. Input can be binary image data or PDF documents (from which images are extracted). Pagination or multiple images/PDF pages produce multiple output items.

Examples

Example 1: Extract bounding boxes of words from an image binary field called 'photo'.

Set 'Operation' to 'Extract Boxes', 'Granularity' to 'words', 'Input Image Field Name' to 'photo', and keep 'Detect on Entire Image?' true. Optionally set minimum confidence to filter low-confidence boxes.

Links

Discussion