예제 #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());
 }