Package seamcarving

Class SeamCarver

    • Method Detail

      • validate

        private static void validate​(Picture picture,
                                     List<Integer> seam)
        Checks that the seam is a valid horizontal seam in the picture.
        Parameters:
        picture - the input picture.
        seam - the seam to remove.
      • picture

        private Picture picture()
        Returns a copy of the current picture.
        Returns:
        a copy of the current picture.
      • removeHorizontal

        public List<Integer> removeHorizontal()
        Removes and returns a minimum-cost horizontal seam from the picture.
        Returns:
        a minimum-cost horizontal seam.
      • removeVertical

        public List<Integer> removeVertical()
        Removes and returns a minimum-cost vertical seam from the picture.
        Returns:
        a minimum-cost vertical seam.