🖥
🖥
🖥
🖥
AugeLab Studio Manual
English
K
Comment on page

Minimum Rotated Rectangle

Minimum Rotated Rectangle Node Documentation

The Minimum Rotated Rectangle node in AugeLab Studio calculates the minimum area rotating rectangle for a given contour. It outputs the image with the rotating rectangle drawn, the center coordinates of the rectangle, the width, the height, and the angle of rotation.

Node Overview

The Minimum Rotated Rectangle node takes an image and a contour as inputs and provides the following outputs:
1. 1.
Image: The input image with the rotating rectangle drawn.
2. 2.
Center: The center coordinates of the rotating rectangle.
3. 3.
Width: The width of the rotating rectangle.
4. 4.
Height: The height of the rotating rectangle.
5. 5.
Angle: The angle of rotation of the rotating rectangle.

Node Properties

• Node Title: Minimum Rotated Rectangle
• Node ID: OP_NODE_MIN_ROT_RECT

Inputs

The Minimum Rotated Rectangle node has the following input sockets:
1. 1.
Image: The input image.
2. 2.
Contour: The contour for which the minimum rotating rectangle is to be calculated.

Outputs

The Minimum Rotated Rectangle node has the following output sockets:
1. 1.
Image: The input image with the rotating rectangle drawn.
2. 2.
Center: The center coordinates of the rotating rectangle.
3. 3.
Width: The width of the rotating rectangle.
4. 4.
Height: The height of the rotating rectangle.
5. 5.
Angle: The angle of rotation of the rotating rectangle.

Node Interaction

1. 1.
Connect an image to the Image input socket of the Minimum Rotated Rectangle node.
2. 2.
Connect a contour to the Contour input socket of the Minimum Rotated Rectangle node.
3. 3.
Run the pipeline.
4. 4.
The output sockets will provide the image with the rotating rectangle drawn, the center coordinates of the rectangle, the width, the height, and the angle of rotation.

Implementation Details

The Minimum Rotated Rectangle node uses the cv2.minAreaRect function from the OpenCV library to calculate the minimum area rotating rectangle for the given contour. The function returns the parameters of the rectangle, including its center coordinates, width, height, and angle of rotation. The node then draws the rotating rectangle on the input image using the obtained parameters.

Usage

1. 1.
Drag and drop the Minimum Rotated Rectangle node from the node library onto the canvas in AugeLab Studio.
2. 2.
Connect an image to the Image input socket of the Minimum Rotated Rectangle node.
3. 3.
Connect a contour to the Contour input socket of the Minimum Rotated Rectangle node.
4. 4.
Run the pipeline.
5. 5.
The output sockets of the Minimum Rotated Rectangle node will provide the image with the rotating rectangle drawn, the center coordinates of the rectangle, the width, the height, and the angle of rotation.

Notes

• The Minimum Rotated Rectangle node is useful for calculating the minimum area rotating rectangle for a given contour in an image.
• The node outputs the image with the rotating rectangle drawn, allowing you to visualize the rectangle.
• The center coordinates, width, height, and angle of rotation can be used for further analysis or calculations.
• Ensure that the input image and contour are correctly connected to the corresponding input sockets of the Minimum Rotated Rectangle node.
• The output socket Image provides the input image with the rotating rectangle drawn.
• The output socket Center provides the center coordinates of the rotating rectangle.
• The output socket Width provides the width of the rotating rectangle.
• The output socket Height provides the height of the rotating rectangle.
• The output socket Angle provides the angle of rotation of the rotating rectangle.
That concludes the documentation for the Minimum Rotated Rectangle node in AugeLab Studio. Use this node to calculate the minimum area rotating rectangle for a contour in an image and extract the center coordinates, width, height, and angle of rotation for further analysis or visualization.