🖥
🖥
🖥
🖥
AugeLab Studio Manual
English
Ask or search…
K
Comment on page

Draw Rectangle

Draw Rectangle Node Documentation

The Draw Rectangle node in AugeLab Studio allows you to draw rectangles on an input image based on provided coordinates or a list of coordinates. Additionally, you can specify the status of each rectangle (True or False), which determines the color of the drawn rectangle.

Node Overview

The Draw Rectangle node takes an input image, coordinates, and an optional status as inputs and provides the following output:
  1. 1.
    Image: The input image with the rectangles drawn based on the provided coordinates and status.

Node Properties

  • Node Title: Draw Rectangle
  • Node ID: OP_NODE_DRAW_RECTANGLE

Inputs

The Draw Rectangle node has the following input sockets:
  1. 1.
    Image: The input image on which the rectangles will be drawn.
  2. 2.
    Coordinates: The coordinates of the rectangle(s) to be drawn. It can be a single coordinate or a list of coordinates. Each coordinate should be in the format ((y0, x0), (y1, x1)).
  3. 3.
    Status: An optional input that specifies the status of each rectangle. If the status is True, the rectangle will be drawn in green; if the status is False, the rectangle will be drawn in red.

Outputs

The Draw Rectangle node has the following output socket:
  1. 1.
    Image: The output image with the rectangles drawn based on the provided coordinates and status.

Node Interaction

To draw rectangles on the image:
  1. 1.
    Connect the input image to the Image input socket of the Draw Rectangle node.
  2. 2.
    Connect the coordinates (either a single coordinate or a list of coordinates) to the Coordinates input socket.
  3. 3.
    (Optional) Connect the status (either a single status or a list of statuses) to the Status input socket.
  4. 4.
    Run the pipeline.
  5. 5.
    The output image will show the input image with the rectangles drawn at the specified coordinates. The color of each rectangle will be determined by the corresponding status.

Implementation Details

The Draw Rectangle node uses the OpenCV library to draw rectangles on the input image. The node checks the type of the coordinates and status inputs to determine whether it needs to draw a single rectangle or multiple rectangles. It then uses the cv2.rectangle function to draw the rectangles on the image, with the color determined by the status.

Usage

  1. 1.
    Drag and drop the Draw Rectangle node from the node library onto the canvas in AugeLab Studio.
  2. 2.
    Connect the input image to the Image input socket of the Draw Rectangle node.
  3. 3.
    Connect the coordinates (either a single coordinate or a list of coordinates) to the Coordinates input socket.
  4. 4.
    (Optional) Connect the status (either a single status or a list of statuses) to the Status input socket.
  5. 5.
    Run the pipeline.
  6. 6.
    The output image will show the input image with the rectangles drawn at the specified coordinates. The color of each rectangle will be determined by the corresponding status.

Notes

  • The Draw Rectangle node is useful for visualizing and highlighting specific areas or regions of interest on an image.
  • It allows you to draw single or multiple rectangles on an image by providing the coordinates.
  • The color of each rectangle can be customized based on the status, allowing for flexible visualization options.
  • The node provides the output image with the drawn rectangles for further analysis or visualization.
That concludes the documentation for the Draw Rectangle on Image node in AugeLab Studio. Use this node to draw rectangles on images at specified coordinates, with customizable colors based on the status, for visualization or analysis purposes.