OCR

This function block utilizes Optical Character Recognition (OCR) technology to detect and extract text from images. It can automatically handle different text orientations and display results visually.

📥 Inputs

Image The input image from which you want to detect text.

📤 Outputs

Result The output image that displays detected text along with bounding boxes.

Whole Text A single string containing all the detected text extracted from the image.

Texts A list of the individual text elements detected in the image.

Boxes A list of bounding boxes around each detected text region.

🕹️ Controls

Auto Rotation A checkbox that enables the use of automatic rotation to read text that might be upside-down.

Show Texts A checkbox that allows displaying the detected text above each bounding box in the output image.

Threshold A slider that sets the confidence threshold to filter out weak detections. Adjusting this value affects which texts are returned based on their detection confidence.

🎨 Features

Multi-Orientation Support The block can process images containing text in various orientations, thanks to its angled mode feature.

Confidence Filtering Outputs only those detections that meet or exceed the specified confidence threshold.

Visual Feedback The function block provides a visual representation of the detected text and bounding boxes in the output image, enhancing user experience.

📝 Usage Instructions

  1. Input Image: Connect an image source to the Image input.

  2. Configure Settings: Enable or disable the Auto Rotation and Show Texts options based on your needs. Adjust the Threshold slider to set a confidence level for text detection.

  3. Run the Block: Execute the function to process the image and detect text. The results will include the annotated image, the whole detected text, individual text items, and bounding boxes.

📊 Evaluation

When executed, this block takes an image input and returns the processed output, along with the text extracted from the image, ready for further analysis or display.

💡 Tips and Tricks

Improving Detection Quality

For optimal results, ensure that the input image is clear and well-lit. Preprocessing the image with Image Threshold or OCR - Text Recognition can enhance detection capabilities.

Handling Skewed Text

If the text appears skewed in the images, enable the Auto Rotation feature to automatically orient text for better detection.

Adjusting the Confidence Threshold

You might want to adjust the Threshold slider to balance between receiving more detections (including those with lower confidence) and filtering out false positives.

🛠️ Troubleshooting

No Text Detected

If no text is detected, ensure that the input image has sufficient resolution and contrast. Increase the threshold if necessary to capture less confident detections.

Output Image is Blank

Ensure that the input image is properly connected and contains content. If the input image is empty or has too much noise, the OCR may fail to provide meaningful output.

Last updated