Page 1 of 1

Automatic segment detection/croping

Posted: 2011-12-19T05:04:47-07:00
by Oldes
Hi,

is there any function which can be used for automatic segment detection which would return regions usable for multiple crop?

For example if I have sequence of PNGs with transparent backgrounds like this:
Image

I want to get the two figures as 2 cropped images (and data with positions of these cropped images in the original).

I know how to do the detection myself, but first want to ask if it's not already possible with ImageMagick itself.

Thank you,
Oldes

Re: Automatic segment detection/croping

Posted: 2011-12-19T10:33:46-07:00
by fmw42
see my scripts, multicrop and separate at the link below. Perhaps those will help or do what you need. The first was more designed for rectangular regions and I have not tested it on irregular ones. The second needs you to convert the image into a binary mask and will separate the mask areas. I don't recall if the coordinates are provided or not, but they could be added.

Re: Automatic segment detection/croping

Posted: 2011-12-22T21:20:58-07:00
by anthony
Also see...
IM Examples, Animation Modification, Splitting up an Animation
http://www.imagemagick.org/Usage/anim_mods/#split