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
Imageinput socket, the block analyzes the picture for text regions.The
Thresholdcontrol filters detected results by confidence; only detections above the threshold are returned.If
Auto Rotationis enabled, the block will attempt to handle rotated text automatically before detection.If the
Show Textscontrol is enabled and theResultoutput 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
Connect an image-producing block (camera, image loader) to the
Imagesocket.Adjust
Thresholdto control detection strictness.Enable
Auto Rotationif the images can contain rotated text.Enable
Show Textsto see labels on theResultimage for verification.Use the
Whole Text,Texts, orBoxesoutputs for logging, search or downstream decision logic.
π‘ Tips and Tricks
Use
Image ROI Selectbefore 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 Resizeblock to reduce resolution and improve processing speed.For rotated documents, combine with
Image AutoRotatorif you still see missed detections withAuto Rotationenabled.Pair with
Show Imageto preview theResultoutput in a larger viewer while tuning controls.Save useful frames and detections with
Image LoggerorImage Writeand export structured text withData to JSONorCSV Exportfor 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
Thresholdvalue and/or crop the input withImage ROI Select.If text is missed, lower the
Thresholdslightly and verify the image contrast; consider preprocessing withAuto ContrastorAdjust Colors.If output boxes look rotated or misaligned, enable
Auto Rotationor try adding anImage AutoRotatorbefore this block.If no output appears visually but text outputs are present, ensure the
Resultoutput socket is connected or useShow Imageto open the visual preview.
Last updated
Was this helpful?