The interfaces provided by Seamstress

Seamstress provides two interfaces for identifying seams in an image, as well as an way to manually protect and expose pixels of an image and a way to create a seam map from an image. The Unpicker seam interface carves seams only in one direction (only vertically, or horizontally) while the Unweaver interface allows arbitrary carving in both directions.

The reason two seam carvers are provided is that optimisation is possible when seam carving is in only one direction. Also, as Seamstress is currently implemented, true horizontal seam carving is much slower than vertical carving. Unpicker gets around this by performing horizontal seam carving as vertical seam carving on a transposed version of the input (that is, a version that is rotated 90 degrees and flipped).

The chief differences between the two interfaces are:

The strategy required to use both is similar.

  1. Create an unpicker or unweaver the same size as the image you want to carve.
  2. Initialise the unpicker or unweaver with the image data.
  3. Compute the energy.
  4. Remove seams, either directly or via the Map interface.
  5. Perhaps obtain further information about the seam carved image (determine the size or transform coordinates).
  6. Delete the unpicker or unweaver.

Hayden Walles 2015-09-02 Logo