CvArrPointPolygonTest Method OpenCvSharp Class Library
Point in contour test

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public double PointPolygonTest(
	CvPoint2D32f pt,
	bool measureDist
)

Parameters

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: Double
The 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 measure_dist=0, the return value is +1, -1 and 0, respectively. When measure_dist≠0, it is a signed distance between the point and the nearest contour edge.
See Also

Reference