how i could color of a specific color instead remove blobs in connected components?

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
diegomage
Posts: 168
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

how i could color of a specific color instead remove blobs in connected components?

Post by diegomage » 2017-09-07T07:15:02-07:00

this is my code

IM trying with mean color but not work

Code: Select all

connected-components:mean-color=srgb\(0,0,255\)

Code: Select all

convert v10.png    -define connected-components:area-threshold=64 -define connected-components:mean-color=srgb\(0,0,255\) -connected-components  8  v1x1.png
this is my image
Image


this is my expected result
Image


please help me

User avatar
fmw42
Posts: 22105
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: how i could color of a specific color instead remove blobs in connected components?

Post by fmw42 » 2017-09-07T10:55:29-07:00

The define for mean color only says that the output should represent the mean color of the region. If you do not use that, then the output image gray levels would be the id numbers for each region.

By using -define connected-components:area-threshold=64, you are telling connected components to remove all regions that have an area smaller than 64 pixels.

I am not sure what you are trying to do. Please clarify further.

Post Reply