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: 205
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 »

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: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post by fmw42 »

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