/Seam-Carving

implementing seam carving for content-aware image resizing

Primary LanguagePython

About

This is my implementation to the seam carving for content-aware image resizing. The Seam carving Algorithm aims to size down images without distorting the main objects as much as possible in a effective way.

Examples

The following photos show the result of running this code on the an image for 0, 124, 300, 500, 770, 900 times.

0

124

300

500

770

900

another example :

original )

200

Anatomy

  • imager.py : Used for simple image processing like: opening images, saving, remove a given seam of pixels, calculating the "Energy for a pixel".
  • core.py : builds the Seam of pixels that has the smallest energy and send it to imager.py to remove that Seam, using Dynamic Programming.

Tasks

  • Build the core parts of the algorithm.
  • Test on a simple case.
  • More testing on different cases.
  • Build a CLI, to better handling the project parts.
  • Strip down the code for performance improvements.
  • integrate Threads and parallel computing to speed up the program