Draw Result On Image

This function block is used to overlay text on an input image based on a specified condition. It allows users to visually communicate success or failure of operations directly on the image.

πŸ“₯ Inputs

Image The image onto which you want to overlay text.

Condition A boolean value that determines whether to display the success or failure text.

Success Condition Text The text that will be displayed on the image if the condition is true.

Fail Condition Text The text that will be displayed on the image if the condition is false.

πŸ“€ Outputs

Image The modified image with the overlaid text based on the specified condition.

πŸ•ΉοΈ Controls

Font Scale A slider to adjust the font size of the overlay text.

Horizontal Position A slider to control the horizontal positioning of the text overlay on the image.

Vertical Position A slider to control the vertical positioning of the text overlay on the image.

🎨 Features

Dynamic Text Overlay The block allows for real-time adjustments to the text, making it easier to adapt to different image sizes or desired appearances.

Visual Feedback Provides immediate visual feedback on the outcome of processes based on the provided input condition.

πŸ“ Usage Instructions

  1. Connect Input Image: Connect the image you want to annotate to the Image input.

  2. Set Condition: Provide a boolean signal to the Condition input to determine whether the success or failure text should be displayed.

  3. Enter Success and Fail Texts: Type the text you wish to display in both the Success Condition Text and Fail Condition Text fields.

  4. Adjust Text Position and Size: Use the font scale and position sliders to place the text on the image as desired.

  5. Evaluate: Run the block to see the changes reflected on the output image.

πŸ“Š Evaluation

When executed, this function block will produce a version of the input image with the text overlaid according to the specified condition, allowing for easy interpretation of processing results.

πŸ’‘ Tips and Tricks

Text Readability

When overlaying text on complex backgrounds, consider using semi-transparent backgrounds for the text to enhance readability. Adjust the text color to contrast with the image for better visibility.

Test with Various Inputs

Use different success and failure texts along with sample images to ensure proper positioning and font scaling for various scenarios.

πŸ› οΈ Troubleshooting

Text Overlapping with Image Edges

If the text is cut off or not fully visible, try adjusting the Horizontal Position and Vertical Position sliders to move the text further from the edges of the image.

Ensure Condition Input Works

If the text does not change based on the condition, ensure the Condition input is being updated correctly and is linked to a valid boolean source.

Last updated