Comment on page
Draw Hull Convex
The
Draw Hull Convex
node in AugeLab Studio draws an enclosing convex hull contour around a complex contour with multiple points. The convex hull is the smallest convex polygon that encloses all the points of the contour.The
Draw Hull Convex
node takes an input image and a contour as inputs and provides the following output:- 1.Image: The input image with the drawn contour and convex hull.
- 2.Contour: The convex hull contour.
- 3.Center: The centroid (center) point of the convex hull contour.
- 4.Area: The area of the convex hull.
- Node Title: Draw Hull Convex
- Node ID: OP_NODE_DRAW_HULL_CONVEX
The
Draw Hull Convex
node has the following input sockets:- 1.Image: The input image on which the contour and convex hull will be drawn.
- 2.Contour: The complex contour for which the convex hull will be calculated and drawn.
The
Draw Hull Convex
node has the following output sockets:- 1.Image: The output image with the drawn contour and convex hull.
- 2.Contour: The convex hull contour.
- 3.Center: The centroid (center) point of the convex hull contour.
- 4.Area: The area of the convex hull.
The
Draw Hull Convex
node uses the cv2.convexHull
function to calculate the convex hull of the input contour. It then draws the original contour and the convex hull on the input image using the cv2.drawContours
function.The node also calculates the centroid (center) point of the convex hull contour using the
cv2.moments
function. The centroid point represents the average position of all the points in the convex hull contour.The area of the convex hull is calculated using the
cv2.contourArea
function.- 1.Drag and drop the
Draw Hull Convex
node from the node library onto the canvas in AugeLab Studio. - 2.Connect the input image to the Image input socket of the
Draw Hull Convex
node. - 3.Connect the complex contour to the Contour input socket of the node.
- 4.Run the pipeline.
- 5.The
Draw Hull Convex
node generates an output image with the original contour and the convex hull drawn on it. - 6.The convex hull contour, centroid (center) point, and area of the convex hull are also provided as outputs.
- 7.Use the output image, convex hull contour, centroid point, and area for further analysis, visualization, or processing in subsequent nodes.
- The
Draw Hull Convex
node is useful for visualizing and analyzing complex contours with multiple points. - The node calculates the convex hull of the contour and draws it on the input image.
- The centroid (center) point and area of the convex hull are also provided as outputs for additional analysis or processing.
That concludes the documentation for the
Draw Hull Convex
node in AugeLab Studio. Use this node to draw an enclosing convex hull contour around complex contours with multiple points and extract relevant information for further analysis or visualization.