OCR
This function block extracts text from images and returns recognized text, bounding boxes, and an optional annotated image. It is designed for simple drag-and-drop pipelines: feed an image, set confidence threshold and options, then consume the text or visualize results.
π₯ Inputs
Image This input accepts any image you want to perform text recognition on.
π€ Outputs
Result Annotated image with detection boxes and optional text overlay.
Whole Text All detected text joined as a single string.
Texts Individual detected text strings (multiple outputs possible).
Boxes Detected bounding boxes for each text region.
πΉοΈ Controls
Use auto rotation Toggle to enable automatic rotation handling for upside-down / rotated text.
Show Texts Toggle to draw recognized text labels on the annotated output image.
Threshold Slider to set minimum confidence for accepted detections (higher = fewer, more confident results).
π¨ Features
Real-time text detection and recognition from images provided to the
Imageinput.Confidence filtering using the
Thresholdslider to ignore weak detections.Optional image annotation: draw boxes and text on the returned
Resultimage whenShow Textsis enabled.Auto-rotation support to improve recognition on rotated or upside-down text when
Use auto rotationis enabled.Outputs are provided in both human-readable string form (
Whole Text/Texts) and structured geometry form (Boxes) for downstream processing.
βοΈ Running mechanism
Provide an image to the
Imageinput and run the scenario.The block processes the image and filters detections below the chosen
Threshold.If any outputs that require visualization are connected, the block returns an annotated
Resultimage with boxes and optional text overlays.Text outputs (
Whole Text,Texts) and geometry outputs (Boxes) are produced for use by other blocks or export tools.Note: the first run may take longer (model or resources are initialized on demand). Afterwards, inference runs faster.
π Usage instructions
Feed the image you want to read into the
Imageinput.Set the
Thresholdslider to filter out low-confidence recognitions. Start with moderate values (e.g., 30β50) and adjust.Enable
Use auto rotationif your images may contain rotated text.Enable
Show Textsif you want the returnedResultimage to show detected text labels.Use the
Whole Text,TextsorBoxesoutputs as needed (for display, logging, or logic).
π‘ Tips and Tricks
Improve accuracy by cropping the area that contains text first with
Image ROI Selectso the block only processes the region of interest.Speed up inference on large images by using
Image Resizebefore feeding the image into this block.Remove complex backgrounds or isolate text regions with
Background Removal (RMBG-1.4)orBackground Removal (BiRefNet)when text sits on cluttered backgrounds.Reduce visual noise with
Bluror convert to a cleaner binary image withImage Thresholdwhen working with noisy captures.Quickly preview OCR results by sending the annotated
Resultimage toShow Image.If you want an alternative OCR approach, try the
OCR (EasyOCR)block and compare results for your dataset.Save recognized text or images downstream with
Image Logger,Image Write, orCSV Exportfor traceability.
π οΈ Troubleshooting
No text detected: increase the input image quality (crop to text, increase resolution) or lower the
Thresholdslightly.Many false detections: raise the
Thresholdand crop the image to focus on real text regions.Rotated text not read correctly: enable
Use auto rotationor pre-rotate the image withImage AutoRotatoror anImage Resize+ rotate step.Slow initial run: the first evaluation may take longer while resources initialize. Subsequent runs will be faster.
If you only need bounding geometry for logic (not annotated images), disconnect visualization outputs to reduce processing overhead.
Last updated