OpenCV453
|
クラス | |
struct | QuadEdge |
struct | Vertex |
公開型 | |
enum | { PTLOC_ERROR = -2 , PTLOC_OUTSIDE_RECT = -1 , PTLOC_INSIDE = 0 , PTLOC_VERTEX = 1 , PTLOC_ON_EDGE = 2 } |
enum | { 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 } |
公開メンバ関数 | |
CV_WRAP | Subdiv2D () |
CV_WRAP | Subdiv2D (Rect rect) |
CV_WRAP void | initDelaunay (Rect rect) |
Creates a new empty Delaunay subdivision [詳解] | |
CV_WRAP int | insert (Point2f pt) |
Insert a single point into a Delaunay triangulation. [詳解] | |
CV_WRAP void | insert (const std::vector< Point2f > &ptvec) |
Insert multiple points into a Delaunay triangulation. [詳解] | |
CV_WRAP int | locate (Point2f pt, CV_OUT int &edge, CV_OUT int &vertex) |
Returns the location of a point within a Delaunay triangulation. [詳解] | |
CV_WRAP int | findNearest (Point2f pt, CV_OUT Point2f *nearestPt=0) |
Finds the subdivision vertex closest to the given point. [詳解] | |
CV_WRAP void | getEdgeList (CV_OUT std::vector< Vec4f > &edgeList) const |
Returns a list of all edges. [詳解] | |
CV_WRAP void | getLeadingEdgeList (CV_OUT std::vector< int > &leadingEdgeList) const |
Returns a list of the leading edge ID connected to each triangle. [詳解] | |
CV_WRAP void | getTriangleList (CV_OUT std::vector< Vec6f > &triangleList) const |
Returns a list of all triangles. [詳解] | |
CV_WRAP void | getVoronoiFacetList (const std::vector< int > &idx, CV_OUT std::vector< std::vector< Point2f > > &facetList, CV_OUT std::vector< Point2f > &facetCenters) |
Returns a list of all Voronoi facets. [詳解] | |
CV_WRAP Point2f | getVertex (int vertex, CV_OUT int *firstEdge=0) const |
Returns vertex location from vertex ID. [詳解] | |
CV_WRAP int | getEdge (int edge, int nextEdgeType) const |
Returns one of the edges related to the given edge. [詳解] | |
CV_WRAP int | nextEdge (int edge) const |
Returns next edge around the edge origin. [詳解] | |
CV_WRAP int | rotateEdge (int edge, int rotate) const |
Returns another edge of the same quad-edge. [詳解] | |
CV_WRAP int | symEdge (int edge) const |
CV_WRAP int | edgeOrg (int edge, CV_OUT Point2f *orgpt=0) const |
Returns the edge origin. [詳解] | |
CV_WRAP int | edgeDst (int edge, CV_OUT Point2f *dstpt=0) const |
Returns the edge destination. [詳解] | |
限定公開メンバ関数 | |
int | newEdge () |
void | deleteEdge (int edge) |
int | newPoint (Point2f pt, bool isvirtual, int firstEdge=0) |
void | deletePoint (int vtx) |
void | setEdgePoints (int edge, int orgPt, int dstPt) |
void | splice (int edgeA, int edgeB) |
int | connectEdges (int edgeA, int edgeB) |
void | swapEdges (int edge) |
int | isRightOf (Point2f pt, int edge) const |
void | calcVoronoi () |
void | clearVoronoi () |
void | checkSubdiv () const |
限定公開変数類 | |
std::vector< Vertex > | vtx |
All of the vertices | |
std::vector< QuadEdge > | qedges |
All of the edges | |
int | freeQEdge |
int | freePoint |
bool | validGeometry |
int | recentEdge |
Point2f | topLeft |
Top left corner of the bounding rect | |
Point2f | bottomRight |
Bottom right corner of the bounding rect | |
anonymous enum |
Subdiv2D point location cases
CV_WRAP cv::Subdiv2D::Subdiv2D | ( | ) |
creates an empty Subdiv2D object. To create a new empty Delaunay subdivision you need to use the initDelaunay function.
CV_WRAP cv::Subdiv2D::Subdiv2D | ( | Rect | rect | ) |
これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。
rect | Rectangle that includes all of the 2D points that are to be added to the subdivision. |
The function creates an empty Delaunay subdivision where 2D points can be added using the function insert() . All of the points to be added must be within the specified rectangle, otherwise a runtime error is raised.
CV_WRAP int cv::Subdiv2D::edgeDst | ( | int | edge, |
CV_OUT Point2f * | dstpt = 0 |
||
) | const |
Returns the edge destination.
edge | Subdivision edge ID. |
dstpt | Output vertex location. |
CV_WRAP int cv::Subdiv2D::edgeOrg | ( | int | edge, |
CV_OUT Point2f * | orgpt = 0 |
||
) | const |
Returns the edge origin.
edge | Subdivision edge ID. |
orgpt | Output vertex location. |
Finds the subdivision vertex closest to the given point.
pt | Input point. |
nearestPt | Output subdivision vertex point. |
The function is another function that locates the input point within the subdivision. It finds the subdivision vertex that is the closest to the input point. It is not necessarily one of vertices of the facet containing the input point, though the facet (located using locate() ) is used as a starting point.
CV_WRAP int cv::Subdiv2D::getEdge | ( | int | edge, |
int | nextEdgeType | ||
) | const |
Returns one of the edges related to the given edge.
edge | Subdivision edge ID. |
nextEdgeType | Parameter specifying which of the related edges to return. The following values are possible:
|
CV_WRAP void cv::Subdiv2D::getEdgeList | ( | CV_OUT std::vector< Vec4f > & | edgeList | ) | const |
Returns a list of all edges.
edgeList | Output vector. |
The function gives each edge as a 4 numbers vector, where each two are one of the edge vertices. i.e. org_x = v[0], org_y = v[1], dst_x = v[2], dst_y = v[3].
CV_WRAP void cv::Subdiv2D::getLeadingEdgeList | ( | CV_OUT std::vector< int > & | leadingEdgeList | ) | const |
Returns a list of the leading edge ID connected to each triangle.
leadingEdgeList | Output vector. |
The function gives one edge ID for each triangle.
CV_WRAP void cv::Subdiv2D::getTriangleList | ( | CV_OUT std::vector< Vec6f > & | triangleList | ) | const |
Returns a list of all triangles.
triangleList | Output vector. |
The function gives each triangle as a 6 numbers vector, where each two are one of the triangle vertices. i.e. p1_x = v[0], p1_y = v[1], p2_x = v[2], p2_y = v[3], p3_x = v[4], p3_y = v[5].
CV_WRAP Point2f cv::Subdiv2D::getVertex | ( | int | vertex, |
CV_OUT int * | firstEdge = 0 |
||
) | const |
Returns vertex location from vertex ID.
vertex | vertex ID. |
firstEdge | Optional. The first edge ID which is connected to the vertex. |
CV_WRAP void cv::Subdiv2D::getVoronoiFacetList | ( | const std::vector< int > & | idx, |
CV_OUT std::vector< std::vector< Point2f > > & | facetList, | ||
CV_OUT std::vector< Point2f > & | facetCenters | ||
) |
Returns a list of all Voronoi facets.
idx | Vector of vertices IDs to consider. For all vertices you can pass empty vector. |
facetList | Output vector of the Voronoi facets. |
facetCenters | Output vector of the Voronoi facets center points. |
CV_WRAP void cv::Subdiv2D::initDelaunay | ( | Rect | rect | ) |
Creates a new empty Delaunay subdivision
rect | Rectangle that includes all of the 2D points that are to be added to the subdivision. |
CV_WRAP void cv::Subdiv2D::insert | ( | const std::vector< Point2f > & | ptvec | ) |
Insert multiple points into a Delaunay triangulation.
ptvec | Points to insert. |
The function inserts a vector of points into a subdivision and modifies the subdivision topology appropriately.
CV_WRAP int cv::Subdiv2D::insert | ( | Point2f | pt | ) |
Insert a single point into a Delaunay triangulation.
pt | Point to insert. |
The function inserts a single point into a subdivision and modifies the subdivision topology appropriately. If a point with the same coordinates exists already, no new point is added.
CV_WRAP int cv::Subdiv2D::locate | ( | Point2f | pt, |
CV_OUT int & | edge, | ||
CV_OUT int & | vertex | ||
) |
Returns the location of a point within a Delaunay triangulation.
pt | Point to locate. |
edge | Output edge that the point belongs to or is located to the right of it. |
vertex | Optional output vertex the input point coincides with. |
The function locates the input point within the subdivision and gives one of the triangle edges or vertices.
CV_WRAP int cv::Subdiv2D::nextEdge | ( | int | edge | ) | const |
Returns next edge around the edge origin.
edge | Subdivision edge ID. |
CV_WRAP int cv::Subdiv2D::rotateEdge | ( | int | edge, |
int | rotate | ||
) | const |
Returns another edge of the same quad-edge.
edge | Subdivision edge ID. |
rotate | Parameter specifying which of the edges of the same quad-edge as the input one to return. The following values are possible:
|