Emgu.CV.CvInvoke.cvPointPolygonTest C# (CSharp) Метод

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
public static cvPointPolygonTest ( IntPtr contour, PointF pt, bool measureDist ) : double
contour IntPtr Input contour
pt PointF The point tested against the contour
measureDist bool If true, the function estimates distance from the point to the nearest contour edge
Результат double
        public static double cvPointPolygonTest(
         IntPtr contour,
         PointF pt,
         bool measureDist)
        {
            return cvPointPolygonTest(contour, pt, measureDist ? 1 : 0);
        }

Same methods

CvInvoke::cvPointPolygonTest ( IntPtr contour, PointF pt, int measureDist ) : double

Usage Example

Пример #1
0
 /// <summary>
 /// Determines the distance from the point to the contour
 /// </summary>
 /// <param name="point">The point to measured distance</param>
 /// <returns>positive distance if inside; negative distance if outside; 0 if on the contour</returns>
 public double Distance(PointF point)
 {
     return(CvInvoke.cvPointPolygonTest(Ptr, point, 1));
 }
All Usage Examples Of Emgu.CV.CvInvoke::cvPointPolygonTest
CvInvoke