Method PointPolygonTest
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
PointPolygonTest(InputArray, Point2f, bool)
Checks if the point is inside the contour. Optionally computes the signed distance from the point to the contour boundary
public static double PointPolygonTest(InputArray contour, Point2f pt, bool measureDist)
Parameters
contourInputArrayptPoint2fmeasureDistbool
Returns
PointPolygonTest(IEnumerable<Point>, Point2f, bool)
Checks if the point is inside the contour. Optionally computes the signed distance from the point to the contour boundary
public static double PointPolygonTest(IEnumerable<Point> contour, Point2f pt, bool measureDist)
Parameters
contourIEnumerable<Point>ptPoint2fmeasureDistbool
Returns
PointPolygonTest(IEnumerable<Point2f>, Point2f, bool)
Checks if the point is inside the contour. Optionally computes the signed distance from the point to the contour boundary.
public static double PointPolygonTest(IEnumerable<Point2f> contour, Point2f pt, bool measureDist)
Parameters
contourIEnumerable<Point2f>Input contour.
ptPoint2fPoint tested against the contour.
measureDistboolIf 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.
Returns
- double
Positive (inside), negative (outside), or zero (on an edge) value.