OCR

This function block extracts text from images and returns both a visual result and structured text outputs. It is designed for quick, user-friendly text detection from images fed into the system.

πŸ“₯ Inputs

Image The image to be analyzed for text (accepts most image formats).

(These are the input sockets for this block.)

πŸ“€ Outputs

Result An image with detected text regions drawn (if any).

Whole Text All detected text concatenated into a single string.

Texts A list of individual detected text strings.

Boxes Bounding shapes (box coordinates) for each detected text region.

(These are the output sockets for this block.)

πŸ•ΉοΈ Controls

Auto Rotation Enable or disable automatic rotation handling so upside-down or rotated text can be detected more reliably.

Show Texts Toggle showing the detected text strings on the output image near their boxes.

Threshold Adjust the confidence cutoff for accepting detected text. Higher values reduce false positives; lower values allow more, possibly weaker, detections.

(These controls are available as on-block widgets to tune detection behavior and visualization.)

βš™οΈ How it runs

  • When an image is provided to the Image input socket, the block analyzes the picture for text regions.

  • The Threshold control filters detected results by confidence; only detections above the threshold are returned.

  • If Auto Rotation is enabled, the block will attempt to handle rotated text automatically before detection.

  • If the Show Texts control is enabled and the Result output socket is connected, the block overlays bounding shapes and text labels on a copy of the image for visual verification.

  • The block produces both visual output (Result) and structured outputs (Whole Text, Texts, Boxes) so you can preview and also process detections further.

✨ Features

  • Easy, single-click text extraction from images.

  • Visual overlay option to inspect detections directly on the image.

  • Confidence threshold lets you tune precision vs recall without changing upstream processing.

  • Rotation handling to improve detection for non-horizontal text.

  • Multiple output formats for flexible downstream use: visual, aggregated text, list of texts, and box coordinates.

πŸ“ Usage tips

  1. Connect an image-producing block (camera, image loader) to the Image socket.

  2. Adjust Threshold to control detection strictness.

  3. Enable Auto Rotation if the images can contain rotated text.

  4. Enable Show Texts to see labels on the Result image for verification.

  5. Use the Whole Text, Texts, or Boxes outputs for logging, search or downstream decision logic.

πŸ’‘ Tips and Tricks

  • Use Image ROI Select before this block to crop to the area where text is expected β€” this reduces false detections and speeds processing.

  • If images are very large, add an Image Resize block to reduce resolution and improve processing speed.

  • For rotated documents, combine with Image AutoRotator if you still see missed detections with Auto Rotation enabled.

  • Pair with Show Image to preview the Result output in a larger viewer while tuning controls.

  • Save useful frames and detections with Image Logger or Image Write and export structured text with Data to JSON or CSV Export for records or analytics.

  • If you want to compare detection results from different OCR approaches, try OCR (EasyOCR) as an alternative and compare outputs.

πŸ› οΈ Troubleshooting

  • If you get many false positives, raise the Threshold value and/or crop the input with Image ROI Select.

  • If text is missed, lower the Threshold slightly and verify the image contrast; consider preprocessing with Auto Contrast or Adjust Colors.

  • If output boxes look rotated or misaligned, enable Auto Rotation or try adding an Image AutoRotator before this block.

  • If no output appears visually but text outputs are present, ensure the Result output socket is connected or use Show Image to open the visual preview.

Last updated

Was this helpful?