Filling Closed Curve

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
foruforewer
Posts: 26
Joined: 2011-02-08T04:37:21-07:00
Authentication code: 8675308

Filling Closed Curve

Post by foruforewer »

Hi,

I have thousands of closed curve images which need to be filled with black color. I want to perform this with dos batch scripting.
Can anyone here please guide for same?

Sample (yes i know not required) is attached here for ready reference.

Image

To

Image
foruforewer
Posts: 26
Joined: 2011-02-08T04:37:21-07:00
Authentication code: 8675308

Re: Filling Closed Curve

Post by foruforewer »

Sorry,

I got my answer

Code: Select all

convert TEST.JPG -fill black -fuzz 15% -draw "color 200,200 floodfill" NEW.PNG
jxramos
Posts: 1
Joined: 2015-01-22T12:35:37-07:00
Authentication code: 6789

Re: Filling Closed Curve

Post by jxramos »

I have a similar problem too where I need to fill in closed boundaries / contours present in an image but in locations NOT known in advance so the trouble with my problem is that I cannot specify the point xy coordinates. Perhaps there's a way to derive them? The trouble is that there may be multiple contours so I need a means to distinguish each individually.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Filling Closed Curve

Post by fmw42 »

jxramos wrote:I have a similar problem too where I need to fill in closed boundaries / contours present in an image but in locations NOT known in advance so the trouble with my problem is that I cannot specify the point xy coordinates. Perhaps there's a way to derive them? The trouble is that there may be multiple contours so I need a means to distinguish each individually.

I do not know if we can help. But you really need to provide examples of input and output and always provide your version of IM and platform.

Please review the very first topic at the top of the Users forum (viewtopic.php?f=1&t=9620)
Post Reply