MatPointPolygonTest Method OpenCvSharp Class Library
Checks if the point is inside the contour. Optionally computes the signed distance from the point to the contour boundary.

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

public double PointPolygonTest(
	Point2f pt,
	bool measureDist
)

Parameters

pt
Type: OpenCvSharp.CPlusPlusPoint2f
Point tested against the contour.
measureDist
Type: SystemBoolean
If true, the function estimates the signed distance from the point to the nearest contour edge. Otherwise, the function only checks if the point is inside a contour or not.

Return Value

Type: Double
Positive (inside), negative (outside), or zero (on an edge) value.
See Also

Reference