| Subdiv2DLocate Method |
Returns the location of a point within a Delaunay triangulation.
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public int Locate(
Point2f pt,
out int edge,
out int vertex
)
Public Function Locate (
pt As Point2f,
<OutAttribute> ByRef edge As Integer,
<OutAttribute> ByRef vertex As Integer
) As Integer
public:
int Locate(
Point2f pt,
[OutAttribute] int% edge,
[OutAttribute] int% vertex
)
member Locate :
pt : Point2f *
edge : int byref *
vertex : int byref -> int
Parameters
- pt
- Type: OpenCvSharpPoint2f
Point to locate. - edge
- Type: SystemInt32
Output edge that the point belongs to or is located to the right of it. - vertex
- Type: SystemInt32
Optional output vertex the input point coincides with.
Return Value
Type:
Int32an 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.
See Also