Javascript implementation of a content-aware image resizing algorithm called seam carving. Seam carving crops an image by removing the "least important" pixels in an image. An "unimportant" pixel is defined as a pixel which is very similar to its surrounding pixels. A seam is a one pixel column in the image which can zig-zag between adjancent columns.

  1. Find the seam of lowest energy.
  2. View the energy of the pixels. Brighter pixels are more important
  3. View the cumulative minimum sum of the pixels going from the top to the bottom edge. Represents the cheapest possible seams.
  4. View the minx. This represents which direction is cheapest from each pixel. Red is down and to the left, Green is straight down and Blue is down and to the right.
  5. Run the demo.
  6. Change the image.
  7. Toggle actual size.
  8. Redraw color.

Made with ❤️ by David Alberto Adler