| Cv2PointPolygonTest Method (IEnumerablePoint2f, Point2f, Boolean) |
Checks if the point is inside the contour.
Optionally computes the signed distance from the point to the contour boundary.
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static double PointPolygonTest(
IEnumerable<Point2f> contour,
Point2f pt,
bool measureDist
)
Public Shared Function PointPolygonTest (
contour As IEnumerable(Of Point2f),
pt As Point2f,
measureDist As Boolean
) As Double
public:
static double PointPolygonTest(
IEnumerable<Point2f>^ contour,
Point2f pt,
bool measureDist
)
static member PointPolygonTest :
contour : IEnumerable<Point2f> *
pt : Point2f *
measureDist : bool -> float
Parameters
- contour
- Type: System.Collections.GenericIEnumerablePoint2f
Input contour. - pt
- Type: OpenCvSharpPoint2f
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:
DoublePositive (inside), negative (outside), or zero (on an edge) value.
See Also