Class RamerDouglasPeucker


  • public class RamerDouglasPeucker
    extends Object
    • Constructor Detail

      • RamerDouglasPeucker

        public RamerDouglasPeucker()
    • Method Detail

      • simplify

        public static final Slice simplify​(Slice slice,
                                           double epsilon)
        Applies the Ramer-Douglas-Peucker algorithm to the contours of a slice.
      • simplify

        public static final Contour simplify​(Contour in,
                                             double epsilon)
        Given a contour, build a similar contour with fewer points.

        The Ramer–Douglas–Peucker algorithm (RDP) is an algorithm for reducing the number of points in a curve that is approximated by a series of points.

        Parameters:
        in - the contour to simplify.
        epsilon - distance threshold.
        Returns:
        a new simplified contour.
        See Also:
        Ramer–Douglas–Peucker Algorithm (Wikipedia)