Resize images by extracting out image seams
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
Earth and Moon-seamed.png
Earth and Moon-stretched.png
Earth and Moon.png
README.md
rescale.py
torre-guaceto-beach-seamed1.png
torre-guaceto-beach-seamed2.png
torre-guaceto-beach.png

README.md

Seam Resize

This little script will resize images using seam extraction instead of cropping or scaling. Essentially what it does is find paths that are "uninteresting" (ie: have a small sum over the square of the sobal transformation of the image) and extracts them. What results is a rescaled image that looks the same without squeezing or scale abnormalities. For example

Original:

picture alt

Resized Thin:

picture alt

Resized Square:

picture alt

Original:

![picture alt](https://github.com/mynameisfiber/seamresize/raw/master/Earth and Moon.png "Original")

Resized:

![picture alt](https://github.com/mynameisfiber/seamresize/raw/master/Earth and Moon-seamed.png "Resized")

Stretched:

![picture alt](https://github.com/mynameisfiber/seamresize/raw/master/Earth and Moon-stretched.png "Stretched") (You can see the artifacts from the stretching... it happens because, for some reason, the seaming algorithm always finds seams in the same region)

TODO

  • Make it so you can make an image larger
  • Speed up path finding algorithm (fortran?)
  • Interface to manually change regions' weighting