OCR (EasyOCR)

This function block detects and extracts text from images using an OCR engine. It is designed for easy integration: provide an image, adjust a confidence threshold, and optionally allow automatic rotation to improve recognition of rotated text.

πŸ“₯ Inputs

  • Image Grayscale or color image that contains the text to be recognized.

πŸ“€ Outputs

  • Result Image annotated with detected boxes and optional text labels (if visualization is enabled downstream).

  • Whole Text Full recognized text as a single string (words joined).

  • Texts Individual recognized text segments as a list.

  • Boxes Bounding polygons (4 points) for each detected text area.

πŸ•ΉοΈ Controls

  • Auto Rotation Toggle to try rotated versions of the input image when looking for text. Useful when text may appear rotated (e.g., phones, tilted signs).

  • Show Texts Toggle to include recognized text labels on the annotated image output (when output visualization is active).

  • Threshold Slider to set minimum confidence required for a detection to be accepted. Higher values reduce false positives but may miss faint text.

✨ Features

  • Multi-angle recognition when Auto Rotation is enabled to improve detection on rotated text.

  • Confidence-based filtering via Threshold to control detection strictness.

  • Returns both textual results and exact bounding polygons for each detection, enabling downstream processing or logging.

  • Will use available hardware acceleration when present to improve performance.

πŸ“Š How it runs

When an image is provided to Image, the block analyzes the image for text, applying the configured threshold and rotation behavior. Accepted detections are returned as text and bounding boxes. If visualization is connected, an annotated image with detected boxes (and optional labels) is produced on the Result output.

πŸ“ Quick start

  1. Connect an image-producing block (for example a camera or an image loader) to Image.

  2. Toggle Auto Rotation if the text may be rotated.

  3. Adjust Threshold to balance between sensitivity and false positives.

  4. Use the Boxes output to draw or log detections, or connect the Result image to a display block to preview.

πŸ’‘ Tips and Tricks

  • Preprocess small or noisy text with Image Resizer or Super Resolution to improve readability before OCR.

  • Crop to the region of interest using Image ROI Select or Image ROI so OCR only processes relevant areas (faster and more accurate).

  • Improve contrast and reduce noise with Contrast Optimization, Denoising, or Adjust Colors before feeding the image.

  • Remove distracting backgrounds with Background Removal (RMBG-1.4) or Background Removal (BiRefNet) when text overlays complex scenes.

  • For quick visual checks, connect the annotated Result to Show Image to inspect box placement and text labels.

  • To compare recognition quality or fallback strategies, try the alternative OCR block and compare results.

  • Save recognized text and logs using CSV Export or assemble structured logs with Data to JSON for downstream systems.

  • If many false positives appear, increase Threshold or apply targeted masking using Apply Mask to exclude irrelevant regions.

πŸ› οΈ Troubleshooting

  • No text detected: increase image size with Image Resizer or improve clarity with Denoising / Contrast Optimization.

  • Low confidence detections: raise the Threshold slider and/or clean the background with background removal blocks.

  • Text appears rotated or upside-down: enable Auto Rotation. If only one angle is problematic, crop with Image ROI Select and rotate externally.

  • Many false positives on textured backgrounds: restrict processing area using Image ROI Select and use Apply Mask to block noisy regions.

  • Want structured output: route Texts and Boxes into Data to JSON or CSV Export for saving or downstream processing.

Last updated

Was this helpful?