示例#1
0
 /// <summary>
 /// Simplify a polygon reducing the number of vertex according the distance "delta".
 /// Uses a version of the Ramer-Douglas-Peucker algorithm (http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm).
 /// </summary>
 /// <param name="polygon">Contour (polygon type).</param>
 /// <param name="delta">Minimun distance.</param>
 /// <returns>A simplify version of the original polygon.</returns>
 public static CvContourPolygon SimplifyPolygon(CvContourPolygon polygon, double delta)
 {
     if (polygon == null)
     {
         throw new ArgumentNullException("polygon");
     }
     return(polygon.Simplify(delta));
 }
示例#2
0
 /// <summary>
 /// Simplify a polygon reducing the number of vertex according the distance "delta".
 /// Uses a version of the Ramer-Douglas-Peucker algorithm (http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm).
 /// </summary>
 /// <param name="polygon">Contour (polygon type).</param>
 /// <returns>A simplify version of the original polygon.</returns>
 public static CvContourPolygon SimplifyPolygon(CvContourPolygon polygon)
 {
     if (polygon == null)
     {
         throw new ArgumentNullException(nameof(polygon));
     }
     return(polygon.Simplify());
 }
示例#3
0
 /// <summary>
 /// Simplify a polygon reducing the number of vertex according the distance "delta".
 /// Uses a version of the Ramer-Douglas-Peucker algorithm (http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm).
 /// </summary>
 /// <param name="polygon">Contour (polygon type).</param>
 /// <returns>A simplify version of the original polygon.</returns>
 public static CvContourPolygon SimplifyPolygon(CvContourPolygon polygon)
 {
     return(polygon.Simplify());
 }