How to Identifies and separate isolated shape from alpha?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dcfvg
Posts: 1
Joined: 2013-06-06T10:15:02-07:00
Authentication code: 6789

How to Identifies and separate isolated shape from alpha?

Post by dcfvg »

Hello,

I'm working with many drawing i make everyday.

i scan them and i remove the background using :
convert a.jpg -fuzz 25% -transparent white a.png
Now, i would like to separate isolated shape using alpha channel :

Image


I found a very clever script by fred aka mw42 who can do that with binaries files but i wasn't able to adapt it.
http://www.fmwconcepts.com/imagemagick/ ... /index.php

The render also seems to be very long : it will never finish with big files ( size > 1000*1000 ) even in binary.

Does anybody got an idea ?

thanks
d.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to Identifies and separate isolated shape from alpha

Post by fmw42 »

Can you provide an example image and describe exactly what you are doing and what you want to achieve?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to Identifies and separate isolated shape from alpha

Post by fmw42 »

I recently made some changes to my separate script to make it run 6x faster.
Post Reply