Draw Detections

This function block is designed to visually mark detected objects on an image. It draws rectangles around specified coordinates and annotates them with text indicating the detection status (e.g., "Ok" or "Nok").

πŸ“₯ Inputs

Image The image on which the detections will be drawn.

Coordinate_List A list containing the coordinates for the rectangles that will be drawn around detected objects. Coordinates should be provided as pairs.

Object_Count A list indicating the count of objects detected at each specified coordinate.

Trigger A boolean input that, when activated, will trigger the drawing process.

πŸ“€ Outputs

Result Image The output image with the drawn rectangles and annotations.

πŸ•ΉοΈ Controls

There are no specific controls in the UI for this function block; it operates based on the provided inputs.

🎨 Features

Visual Annotations Draws rectangles and provides text feedback directly on the image to easily identify detection results.

Flexible Input Structure Can accept lists of coordinates and object counts in a variety of structures, making it adaptable to different scenarios.

πŸ“ Usage Instructions

  1. Connect Input Image: Connect an image to the Image input where detections should be displayed.

  2. Specify Detections: Provide a list of coordinates via the Coordinate_List input, where each coordinate is a pair marking the corners of a rectangle.

  3. Object Count: Connect a corresponding list of object counts to the Object_Count input.

  4. Activate Trigger: Send a Trigger signal to begin the drawing process. If this signal is not activated, no drawing will occur.

πŸ“Š Evaluation

Upon evaluation, this block outputs the modified image with rectangles and text indicating the detection results based on the provided coordinates and counts.

πŸ’‘ Tips and Tricks

Adjusting Colors and Fonts

You can customize the rectangle colors and text based on your preferences or highlight specific detections by adapting the values in the code.

Dynamic Thresholding

You can link the output of other detection blocks, like Find Object or Safety Equipment Detection, to dynamically adjust which objects get annotated based on their count.

Layering Annotations

To provide more context, consider layering other forms of annotations using additional function blocks that may provide further insights over the same image.

πŸ› οΈ Troubleshooting

No Objects Drawn

If rectangles are not being drawn, check that the Trigger is activated and ensure that the lengths of the Coordinate_List and Object_Count are equal.

Invalid Coordinates

If you receive warnings about invalid coordinates, verify that the coordinates are properly formatted and do not exceed the image dimensions.

Last updated