6

I'm using GraphicsMagic (and have several bindings that require GM). Now I have to rescale images by Seam Carving algorithm that is available in ImageMagic via -liquid-rescale option but is missing in GM (isn't it?). Is there any options to install both GM and IM without conflicts (on Ubuntu 12.04) or is there any other command-line tools that can perform SeamCarving/LiquidRescale?

Artazor
  • 71
  • 2

1 Answers1

1

You can build a very simple script with python and scikit implementation. Additionally, many tools like this are available on github. Just as an example:

from skimage import data, draw
from skimage import transform, util
import numpy as np
from skimage import filters, color
from matplotlib import pyplot as plt

img = data.rocket()
img = util.img_as_float(img)

eimg = filters.sobel(color.rgb2gray(img))
out = transform.seam_carve(img, eimg, 'vertical', 200)
plt.title('Resized using Seam Carving')
plt.imshow(out)
rikyeah
  • 1,896
  • 4
  • 11
  • 21