Ejemplo n.º 1
0
 /// <summary>
 /// Computes convex hull for a set of 2D points.
 /// </summary>
 /// <param name="points">The input 2D point set, represented by CV_32SC2 or CV_32FC2 matrix</param>
 /// <param name="clockwise">If true, the output convex hull will be oriented clockwise, 
 /// otherwise it will be oriented counter-clockwise. Here, the usual screen coordinate 
 /// system is assumed - the origin is at the top-left corner, x axis is oriented to the right, 
 /// and y axis is oriented downwards.</param>
 /// <returns>The output convex hull. It is a vector of points that form the 
 /// hull (must have the same type as the input points).</returns>
 public Point[] ConvexHullPoints(InputArray points, bool clockwise = false)
 {
     var dst = new MatOfPoint();
     Cv2.ConvexHull(points, dst, clockwise, true);
     return dst.ToArray();
 }