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
Connect an image source to
Image(e.g., camera or image loader).Toggle
Auto Rotationif your images may be rotated.Set the
Thresholdslider to balance recall vs. precision.Enable
Show Textsif you want the annotated image to display recognized strings.Read outputs from
Whole Text,Texts, andBoxesfor logging or downstream processing.
π‘ Tips and Tricks
For clearer OCR results, preprocess the image with
Contrast OptimizationandBlurto reduce noise and improve character contrast.If you only need to focus on a specific area, crop first using
Image ROI Selectthen feed the cropped image into this block.When working with very large images, use
Image Resizerto reduce size before OCR to speed up processing.Use
Show Imageto 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 Loggerfor 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
Thresholdvalue.If results are noisy (many false positives), raise the
Thresholdto filter low-confidence detections.For rotated or upside-down text, enable
Auto Rotationbefore increasing threshold.If annotated image is not appearing, connect a viewer or use
Show Imageto ensure the visual output is routed.
Last updated