Cv2.contourArea
lastmod 2024-03-07created 2023-01-122 edits
OpenCV Contours APIs
- Contours
- OpenCV:Contours
- cv2.approxPolyDP - Approximates (simplifies) a polygonal curve with the specified precision.
- cv2.arcLength - Calculates a contour perimeter or a curve length.
- cv2.boundingRect - Calculates the upper-right bounding rectangle of a point set or of the non-zero pixels of a grayscale image.
- cv2.boxPoints - Finds the four vertices of a rotated rectangle. Useful for drawing the rotated rectangle.
- cv2.connectedComponents - Computes the connected components labeled image of a boolean image.
- cv2.connectedComponentsWithStats - Computes the connected components labeled image of a boolean image and also produces a statistics output for each label.
- cv2.contourArea - Calculates a contour area.
- cv2.convexHull - Finds the convex hull of a point set.
- cv2.convexityDefects - Finds the convexity defects of a contour.
- cv2.createGeneralizedHoughBallard - Creates a smart pointer to a cv2.GeneralizedHoughBallard class and initializes it.
- cv2.createGeneralizedHoughGuil - Creates a smart pointer to a cv2.GeneralizedHoughGuil class and initializes it.
- cv2.drawContours - Draws contours.
- cv2.findContours - Finds contours in a binary image.
- cv2.fitEllipse - Fits an ellipse around a set of 2D points.
- cv2.fitEllipseAMS - Fits an ellipse around a set of 2D points.
- cv2.fitEllipseDirect - Fits an ellipse around a set of 2D points.
- cv2.fitLine - Fits a line to a 2D or 3D point set.
- cv2.HuMoments - Calculates the seven Hu invariants.
- cv2.intersectConvexConvex - Finds the intersection of two convex polygons.
- cv2.isContourConvex - Tests contour convexity.
- cv2.matchShapes - Compares two shapes.
- cv2.minAreaRect - Finds a rotated rectangle of the minimum area enclosing the input 2D point set.
- cv2.minEnclosingCircle - Finds a circle of the minimum area enclosing a 2D point set.
- cv2.minEnclosingTriangle - Finds a triangle of minimum area enclosing a 2D point set and returns its area.
- cv2.moments - Calculates all of the moments up to the third order of a polygon or rasterized shape.
- cv2.pointPolygonTest - Performs a point-in-contour test.
- cv2.rotatedRectangleIntersection - Checks whether there is any intersection between two rotated rectangles.