Point in contour test
Namespace: OpenCvSharp
Assembly: OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static double PointPolygonTest( CvArr contour, CvPoint2D32f pt, bool measureDist )
Parameters
- contour
- Type: OpenCvSharpCvArr
Input contour. - pt
- Type: OpenCvSharpCvPoint2D32f
The point tested against the contour. - measureDist
- Type: SystemBoolean
If it is true, the function estimates distance from the point to the nearest contour edge.
Return Value
Type: DoubleThe function cvPointPolygonTest determines whether the point is inside contour, outside, or lies on an edge (or coinsides with a vertex). It returns positive, negative or zero value, correspondingly. When measureDist=0, the return value is +1, -1 and 0, respectively. When measureDist≠0, it is a signed distance between the point and the nearest contour edge.
See Also