Method Locate
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Locate(Point2f, out int, out int)
Returns the location of a point within a Delaunay triangulation.
public int Locate(Point2f pt, out int edge, out int vertex)
Parameters
ptPoint2fPoint to locate.
edgeintOutput edge that the point belongs to or is located to the right of it.
vertexintOptional output vertex the input point coincides with.
Returns
- int
an integer which specify one of the following five cases for point location: - The point falls into some facet. The function returns #PTLOC_INSIDE and edge will contain one of edges of the facet. - The point falls onto the edge. The function returns #PTLOC_ON_EDGE and edge will contain this edge. - The point coincides with one of the subdivision vertices. The function returns #PTLOC_VERTEX and 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 processing mode is selected, #PTLOC_ERROR is returned.