Package seamfinding
Interface SeamFinder
-
- All Known Implementing Classes:
AdjacencyListSeamFinder,DynamicProgrammingSeamFinder,GenerativeSeamFinder
public interface SeamFinderFinds a horizontal seam through thePicturewith the lowest sum ofEnergyFunctioncosts. A horizontal seam is defined as a path of adjacent or diagonally-adjacent pixels from the left to right edges of an image.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description List<Integer>findHorizontal(Picture picture, EnergyFunction f)Returns a minimum-energy horizontal seam in the current image as aListof integers representing the vertical pixel index to remove from each column in the width of the horizontal seam.default List<Integer>findVertical(Picture picture, EnergyFunction f)Returns a minimum-energy vertical seam in the current image as aListof integers representing the horizontal pixel index to remove from each row in the height of the vertical seam.
-
-
-
Method Detail
-
findHorizontal
List<Integer> findHorizontal(Picture picture, EnergyFunction f)
Returns a minimum-energy horizontal seam in the current image as aListof integers representing the vertical pixel index to remove from each column in the width of the horizontal seam.- Parameters:
picture- thePicture.f- theEnergyFunction.- Returns:
- a
Listof integers representing the vertical pixels to remove.
-
findVertical
default List<Integer> findVertical(Picture picture, EnergyFunction f)
Returns a minimum-energy vertical seam in the current image as aListof integers representing the horizontal pixel index to remove from each row in the height of the vertical seam.- Parameters:
picture- thePicture.f- theEnergyFunction.- Returns:
- a
Listof integers representing the horizontal pixels to remove.
-
-