opencv2/geometry/2d.hpp#
#include <opencv2/core.hpp>
#include <opencv2/core/utils/logger.hpp>
Include dependency graph for 2d.hpp:
This graph shows which files directly or indirectly include 2d.hpp:
Classes#
struct cv::Subdiv2D::QuadEdge
class cv::Subdiv2D
struct cv::Subdiv2D::Vertex
Namespaces#
namespace cv
Enumerations#
enum cv::Subdiv2D { PTLOC_ERROR = -2, PTLOC_OUTSIDE_RECT = -1, PTLOC_INSIDE = 0, PTLOC_VERTEX = 1, PTLOC_ON_EDGE = 2 }
enum cv::Subdiv2D { NEXT_AROUND_ORG = 0x00, NEXT_AROUND_DST = 0x22, PREV_AROUND_ORG = 0x11, PREV_AROUND_DST = 0x33, NEXT_AROUND_LEFT = 0x13, NEXT_AROUND_RIGHT = 0x31, PREV_AROUND_LEFT = 0x20, PREV_AROUND_RIGHT = 0x02 }
enum cv::DistanceTypes { DIST_USER = -1, DIST_L1 = 1, DIST_L2 = 2, DIST_C = 3, DIST_L12 = 4, DIST_FAIR = 5, DIST_WELSCH = 6, DIST_HUBER = 7 }
enum cv::RectanglesIntersectTypes { INTERSECT_NONE = 0, INTERSECT_PARTIAL = 1, INTERSECT_FULL = 2 }
types of intersection between rectangles More…
Functions#
cv::Subdiv2D::QuadEdge::QuadEdge ()
cv::Subdiv2D::QuadEdge::QuadEdge (int edgeidx)
cv::Subdiv2D::Subdiv2D ()
cv::Subdiv2D::Subdiv2D (Rect rect)
cv::Subdiv2D::Subdiv2D (Rect2f rect2f)
cv::Subdiv2D::Vertex::Vertex ()
cv::Subdiv2D::Vertex::Vertex (Point2f pt, bool isvirtual, int firstEdge=0)
void cv::approxPolyDP (InputArray curve, OutputArray approxCurve, double epsilon, bool closed)
Approximates a polygonal curve(s) with the specified precision.
void cv::approxPolyN (InputArray curve, OutputArray approxCurve, int nsides, float epsilon_percentage=-1.0, bool ensure_convex=true)
Approximates a polygon with a convex hull with a specified accuracy and number of sides.
double cv::arcLength (InputArray curve, bool closed)
Calculates a contour perimeter or a curve length.
Rect cv::boundingRect (InputArray array)
Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image.
void cv::boxPoints (RotatedRect box, OutputArray points)
Finds the four vertices of a rotated rect. Useful to draw the rotated rectangle.
void cv::Subdiv2D::calcVoronoi ()
void cv::Subdiv2D::checkSubdiv () const
void cv::Subdiv2D::clearVoronoi ()
int cv::Subdiv2D::connectEdges (int edgeA, int edgeB)
double cv::contourArea (InputArray contour, bool oriented=false)
Calculates a contour area.
void cv::convexHull (InputArray points, OutputArray hull, bool clockwise=false, bool returnPoints=true)
Finds the convex hull of a point set.
void cv::convexityDefects (InputArray contour, InputArray convexhull, OutputArray convexityDefects)
Finds the convexity defects of a contour.
void cv::Subdiv2D::deleteEdge (int edge)
void cv::Subdiv2D::deletePoint (int vtx)
int cv::Subdiv2D::edgeDst (int edge, Point2f *dstpt=0) const
Returns the edge destination.
int cv::Subdiv2D::edgeOrg (int edge, Point2f *orgpt=0) const
Returns the edge origin.
int cv::Subdiv2D::findNearest (Point2f pt, Point2f *nearestPt=0)
Finds the subdivision vertex closest to the given point.
RotatedRect cv::fitEllipse (InputArray points)
Fits an ellipse around a set of 2D points.
RotatedRect cv::fitEllipseAMS (InputArray points)
Fits an ellipse around a set of 2D points.
RotatedRect cv::fitEllipseDirect (InputArray points)
Fits an ellipse around a set of 2D points.
void cv::fitLine (InputArray points, OutputArray line, int distType, double param, double reps, double aeps)
Fits a line to a 2D or 3D point set.
Mat cv::getAffineTransform (const Point2f src[], const Point2f dst[])
Calculates an affine transform from three pairs of the corresponding points.
Mat cv::getAffineTransform (InputArray src, InputArray dst)
void cv::getClosestEllipsePoints (const RotatedRect &ellipse_params, InputArray points, OutputArray closest_pts)
Compute for each 2d point the nearest 2d point located on a given ellipse.
int cv::Subdiv2D::getEdge (int edge, int nextEdgeType) const
Returns one of the edges related to the given edge.
void cv::Subdiv2D::getEdgeList (std::vector< Vec4f > &edgeList) const
Returns a list of all edges.
void cv::Subdiv2D::getLeadingEdgeList (std::vector< int > &leadingEdgeList) const
Returns a list of the leading edge ID connected to each triangle.
Mat cv::getPerspectiveTransform (const Point2f src[], const Point2f dst[], int solveMethod=DECOMP_LU)
Mat cv::getPerspectiveTransform (InputArray src, InputArray dst, int solveMethod=DECOMP_LU)
Calculates a perspective transform from four pairs of the corresponding points.
Mat cv::getRotationMatrix2D (Point2f center, double angle, double scale)
Calculates an affine matrix of 2D rotation.
Matx23d cv::getRotationMatrix2D_ (Point2f center, double angle, double scale)
void cv::Subdiv2D::getTriangleList (std::vector< Vec6f > &triangleList) const
Returns a list of all triangles.
Point2f cv::Subdiv2D::getVertex (int vertex, int *firstEdge=0) const
Returns vertex location from vertex ID.
void cv::Subdiv2D::getVoronoiFacetList (const std::vector< int > &idx, std::vector< std::vector< Point2f > > &facetList, std::vector< Point2f > &facetCenters)
Returns a list of all Voronoi facets.
void cv::HuMoments (const Moments &m, OutputArray hu)
void cv::HuMoments (const Moments &moments, double hu[7])
Calculates seven Hu invariants.
void cv::Subdiv2D::initDelaunay (Rect rect)
Creates a new empty Delaunay subdivision.
void cv::Subdiv2D::initDelaunay (Rect2f rect)
Creates a new empty Delaunay subdivision.
void cv::Subdiv2D::insert (const std::vector< Point2f > &ptvec)
Insert multiple points into a Delaunay triangulation.
int cv::Subdiv2D::insert (Point2f pt)
Insert a single point into a Delaunay triangulation.
float cv::intersectConvexConvex (InputArray p1, InputArray p2, OutputArray p12, bool handleNested=true)
Finds intersection of two convex polygons.
void cv::invertAffineTransform (InputArray M, OutputArray iM)
Inverts an affine transformation.
bool cv::isContourConvex (InputArray contour)
Tests a contour convexity.
bool cv::Subdiv2D::QuadEdge::isfree () const
bool cv::Subdiv2D::Vertex::isfree () const
int cv::Subdiv2D::isRightOf (Point2f pt, int edge) const
bool cv::Subdiv2D::Vertex::isvirtual () const
int cv::Subdiv2D::locate (Point2f pt, int &edge, int &vertex)
Returns the location of a point within a Delaunay triangulation.
double cv::matchShapes (InputArray contour1, InputArray contour2, int method, double parameter)
Compares two shapes.
RotatedRect cv::minAreaRect (InputArray points)
Finds a rotated rectangle of the minimum area enclosing the input 2D point set.
void cv::minEnclosingCircle (InputArray points, Point2f ¢er, float &radius)
Finds a circle of the minimum area enclosing a 2D point set.
double cv::minEnclosingConvexPolygon (InputArray points, OutputArray polygon, int k)
Finds a convex polygon of minimum area enclosing a 2D point set and returns its area.
double cv::minEnclosingTriangle (InputArray points, OutputArray triangle)
Finds a triangle of minimum area enclosing a 2D point set and returns its area.
Moments cv::moments (InputArray array, bool binaryImage=false)
Calculates all of the moments up to the third order of a polygon or rasterized shape.
int cv::Subdiv2D::newEdge ()
int cv::Subdiv2D::newPoint (Point2f pt, bool isvirtual, int firstEdge=0)
int cv::Subdiv2D::nextEdge (int edge) const
Returns next edge around the edge origin.
double cv::pointPolygonTest (InputArray contour, Point2f pt, bool measureDist)
Performs a point-in-contour test.
int cv::rotatedRectangleIntersection (const RotatedRect &rect1, const RotatedRect &rect2, OutputArray intersectingRegion)
Finds out if there is any intersection between two rotated rectangles.
int cv::Subdiv2D::rotateEdge (int edge, int rotate) const
Returns another edge of the same quad-edge.
void cv::Subdiv2D::setEdgePoints (int edge, int orgPt, int dstPt)
void cv::Subdiv2D::splice (int edgeA, int edgeB)
void cv::Subdiv2D::swapEdges (int edge)
int cv::Subdiv2D::symEdge (int edge) const