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.
The following photos show the result of running this code on the an image for 0, 124, 300, 500, 770, 900 times.
another example :
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 toimager.py
to remove that Seam, using Dynamic Programming.
- 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