Skip to content
Search

Cv2.approxPolyDP

lastmod 2024-03-07created 2022-12-213 edits

Simplifies a curve or polygon using the Douglas-Peucker algorithm.

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 up-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 and initializes a smart pointer to the cv2.GeneralizedHoughBallard class.
  • cv2.createGeneralizedHoughGuil - Creates and initializes a smart pointer to the cv2.GeneralizedHoughGuil class.
  • 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 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 the 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.

See also

Favorite site

author Zer0 sitemap