@ -198,8 +198,8 @@ int main(int argc, const char *argv[])
The Subdiv2D class described in this section is used to perform various planar subdivision on
a set of 2 D points ( represented as vector of Point2f ) . OpenCV subdivides a plane into triangles
using the Delaunay ’ s algorithm , which corresponds to the dual graph of the Voronoi diagram .
In the figure below , the Delaunay ’ s triangulation is marked with black lines and the Voronoi
using the Delaunay ' s algorithm , which corresponds to the dual graph of the Voronoi diagram .
In the figure below , the Delaunay ' s triangulation is marked with black lines and the Voronoi
diagram with red lines .
! [ Delaunay triangulation ( black ) and Voronoi ( red ) ] ( pics / delaunay_voronoi . png )
@ -955,7 +955,7 @@ public:
/** @overload
@ param rect – Rectangle that includes all of the 2 D points that are to be added to the subdivision .
@ param rect Rectangle that includes all of the 2 D points that are to be added to the subdivision .
The function creates an empty Delaunay subdivision where 2 D points can be added using the function
insert ( ) . All of the points to be added must be within the specified rectangle , otherwise a runtime
@ -965,14 +965,14 @@ public:
/** @brief Creates a new empty Delaunay subdivision
@ param rect – Rectangle that includes all of the 2 D points that are to be added to the subdivision .
@ param rect Rectangle that includes all of the 2 D points that are to be added to the subdivision .
*/
CV_WRAP void initDelaunay ( Rect rect ) ;
/** @brief Insert a single point into a Delaunay triangulation.
@ param pt – Point to insert .
@ param 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 .
@ -984,7 +984,7 @@ public:
/** @brief Insert multiple points into a Delaunay triangulation.
@ param ptvec – Points to insert .
@ param ptvec Points to insert .
The function inserts a vector of points into a subdivision and modifies the subdivision topology
appropriately .
@ -993,9 +993,9 @@ public:
/** @brief Returns the location of a point within a Delaunay triangulation.
@ param pt – Point to locate .
@ param edge – Output edge that the point belongs to or is located to the right of it .
@ param vertex – Optional output vertex the input point coincides with .
@ param pt Point to locate .
@ param edge Output edge that the point belongs to or is located to the right of it .
@ param 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 .
@ -1008,15 +1008,15 @@ public:
vertex will contain a pointer to the vertex .
- The point is outside the subdivision reference rectangle . The function returns PTLOC_OUTSIDE_RECT
and no pointers are filled .
- One of input arguments is invalid . A runtime error is raised or , if silent or “ parent ” error
- One of input arguments is invalid . A runtime error is raised or , if silent or " parent " error
processing mode is selected , CV_PTLOC_ERROR is returned .
*/
CV_WRAP int locate ( Point2f pt , CV_OUT int & edge , CV_OUT int & vertex ) ;
/** @brief Finds the subdivision vertex closest to the given point.
@ param pt – Input point .
@ param nearestPt – Output subdivision vertex point .
@ param pt Input point .
@ param 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
@ -1029,7 +1029,7 @@ public:
/** @brief Returns a list of all edges.
@ param edgeList – Output vector .
@ param 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 ] .
@ -1038,7 +1038,7 @@ public:
/** @brief Returns a list of the leading edge ID connected to each triangle.
@ param leadingEdgeList – Output vector .
@ param leadingEdgeList Output vector .
The function gives one edge ID for each triangle .
*/
@ -1046,7 +1046,7 @@ public:
/** @brief Returns a list of all triangles.
@ param triangleList – Output vector .
@ param 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 ] .
@ -1055,9 +1055,9 @@ public:
/** @brief Returns a list of all Voroni facets.
@ param idx – Vector of vertices IDs to consider . For all vertices you can pass empty vector .
@ param facetList – Output vector of the Voroni facets .
@ param facetCenters – Output vector of the Voroni facets center points .
@ param idx Vector of vertices IDs to consider . For all vertices you can pass empty vector .
@ param facetList Output vector of the Voroni facets .
@ param facetCenters Output vector of the Voroni facets center points .
*/
CV_WRAP void getVoronoiFacetList ( const std : : vector < int > & idx , CV_OUT std : : vector < std : : vector < Point2f > > & facetList ,
@ -1065,8 +1065,8 @@ public:
/** @brief Returns vertex location from vertex ID.
@ param vertex – vertex ID .
@ param firstEdge – Optional . The first edge ID which is connected to the vertex .
@ param vertex vertex ID .
@ param firstEdge Optional . The first edge ID which is connected to the vertex .
@ returns vertex ( x , y )
*/
@ -1074,8 +1074,8 @@ public:
/** @brief Returns one of the edges related to the given edge.
@ param edge – Subdivision edge ID .
@ param nextEdgeType - Parameter specifying which of the related edges to return .
@ param edge Subdivision edge ID .
@ param nextEdgeType Parameter specifying which of the related edges to return .
The following values are possible :
- NEXT_AROUND_ORG next around the edge origin ( eOnext on the picture below if e is the input edge )
- NEXT_AROUND_DST next around the edge vertex ( eDnext )
@ -1094,7 +1094,7 @@ public:
/** @brief Returns next edge around the edge origin.
@ param edge – Subdivision edge ID .
@ param edge Subdivision edge ID .
@ returns an integer which is next edge ID around the edge origin : eOnext on the
picture above if e is the input edge ) .
@ -1103,8 +1103,8 @@ public:
/** @brief Returns another edge of the same quad-edge.
@ param edge – Subdivision edge ID .
@ param rotate - Parameter specifying which of the edges of the same quad - edge as the input
@ param edge Subdivision edge ID .
@ param rotate Parameter specifying which of the edges of the same quad - edge as the input
one to return . The following values are possible :
- 0 - the input edge ( e on the picture below if e is the input edge )
- 1 - the rotated edge ( eRot )
@ -1118,8 +1118,8 @@ public:
/** @brief Returns the edge origin.
@ param edge – Subdivision edge ID .
@ param orgpt – Output vertex location .
@ param edge Subdivision edge ID .
@ param orgpt Output vertex location .
@ returns vertex ID .
*/
@ -1127,8 +1127,8 @@ public:
/** @brief Returns the edge destination.
@ param edge – Subdivision edge ID .
@ param dstpt – Output vertex location .
@ param edge Subdivision edge ID .
@ param dstpt Output vertex location .
@ returns vertex ID .
*/