OCR

This function block extracts printed or handwritten text from an image and returns both visual and textual results. It is designed for easy use: supply an image, adjust sensitivity, and enable auto-rotation or text overlay as needed.

πŸ“₯ Inputs

Image This input socket accepts the image you want to read text from.

πŸ“€ Outputs

Result Annotated image with detected text boxes drawn (if an output viewer is connected).

Whole Text Concatenated detected text as a single string.

Texts List of detected text strings (multiple outputs possible).

Boxes Detected bounding boxes for each text instance (coordinates).

πŸ•ΉοΈ Controls

Auto Rotation Toggle to allow the block to try reading rotated or upside-down text.

Show Texts Toggle to draw recognized text and confidence on the annotated image.

Threshold Slider to control minimum confidence required for a detection to be accepted (lower = more results, higher = fewer but more reliable results).

🎯 Features

  • Real-time text extraction from images fed into the block.

  • Option to auto-rotate input images so upside-down or rotated text can be read.

  • Confidence threshold to filter out low-confidence recognitions.

  • Visual output with bounding boxes and optional text overlay for quick verification.

  • Provides both structured outputs (list of texts and boxes) and a single concatenated text output for easy downstream use.

βš™οΈ How it runs

When an image is provided to the input socket, the block runs the OCR process and returns:

  • an annotated image on Result (if any output is connected),

  • the full recognized text on Whole Text,

  • individual detected strings on Texts,

  • and bounding box coordinates on Boxes.

Use Auto Rotation to improve detection on rotated images. Use Threshold to exclude low-confidence results.

πŸ“ Usage Instructions

  1. Connect an image source to Image (e.g., camera or image loader).

  2. Toggle Auto Rotation if your images may be rotated.

  3. Set the Threshold slider to balance recall vs. precision.

  4. Enable Show Texts if you want the annotated image to display recognized strings.

  5. Read outputs from Whole Text, Texts, and Boxes for logging or downstream processing.

πŸ’‘ Tips and Tricks

  • For clearer OCR results, preprocess the image with Contrast Optimization and Blur to reduce noise and improve character contrast.

  • If you only need to focus on a specific area, crop first using Image ROI Select then feed the cropped image into this block.

  • When working with very large images, use Image Resizer to reduce size before OCR to speed up processing.

  • Use Show Image to preview the annotated output quickly during development.

  • If you prefer a different OCR engine or need an alternative approach, try OCR (EasyOCR) and compare results.

  • Save recognized frames and logs with Image Logger for offline review or audit trails.

(hint: combine these blocks in your flow to improve detection quality and performance: Image ROI Select, Image Resizer, Contrast Optimization, Blur, Show Image, Image Logger, OCR (EasyOCR).)

πŸ› οΈ Troubleshooting

  • If no text is detected, check that the input image contains legible text and try increasing contrast or lowering the Threshold value.

  • If results are noisy (many false positives), raise the Threshold to filter low-confidence detections.

  • For rotated or upside-down text, enable Auto Rotation before increasing threshold.

  • If annotated image is not appearing, connect a viewer or use Show Image to ensure the visual output is routed.

Last updated