cant remove gray blobs of this image srgba to gray (update ) (solved)?

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

cant remove gray blobs of this image srgba to gray (update ) (solved)?

Post by diegomage » 2017-10-13T21:53:18-07:00

IM trying with posterize depth8 , threshold and png 8 but nothings works

Code: Select all

convert skeleton.jpg -morphology HMT LineEnds -threshold 50% -fill white -opaque white -negate png8:mmmm

Code: Select all

convert mmmm  -depth 8 +dither   -posterize 2  -threshold 99% zlineends.jpg
this is my image
Image

please help me


Image

I see the format of my image and is srgba
Last edited by diegomage on 2017-10-14T12:21:02-07:00, edited 3 times in total.

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

Re: cant remove gray blobs of this image ?

Post by fmw42 » 2017-10-13T22:03:48-07:00

Your original image is empty? Have you posted the correct image? Your output mmm needs a suffix?

diegomage
Posts: 168
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: cant remove gray blobs of this image ?

Post by diegomage » 2017-10-13T22:12:21-07:00

is original there are blobs black in the image with blobs gray

diegomage
Posts: 168
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: cant remove gray blobs of this image ?

Post by diegomage » 2017-10-13T22:13:55-07:00

for example when I save this image with another software this dither command works well but with imagemagick not works well IM dont know what is the correct format for remove blobs

diegomage
Posts: 168
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: cant remove gray blobs of this image ?

Post by diegomage » 2017-10-13T22:14:56-07:00

the extra image is my image enlarge for show the gray blobs in the image

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

Re: cant remove gray blobs of this image ?

Post by fmw42 » 2017-10-13T22:47:01-07:00

OK. I can see the dots after -auto-level and expanding. What is you want to do with the original. If you just want to remove the dots. User -morphology close octagon:X. where X=1 or 2, for example. Or use -evaluate max 3x3 or 5x5.

If that is not why you want, then please explain further .

diegomage
Posts: 168
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: cant remove gray blobs of this image ?

Post by diegomage » 2017-10-13T22:52:11-07:00

this is rare but i think that the problem is the format because a use kolourpaint for example for remove blobs using contrast method and works but with imagemagick not works

I dont know why

diegomage
Posts: 168
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: cant remove gray blobs of this image srgba tp gray (update ) ?

Post by diegomage » 2017-10-13T23:08:09-07:00

I see the format of my image and I view that this is SRGBA ; exist any way to convert to grayscale ?

snibgo
Posts: 9379
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: cant remove gray blobs of this image srgba to gray (update ) ?

Post by snibgo » 2017-10-14T00:30:19-07:00

Exiftool says the supplied image file, qMTdc.jpg, has only one color component. So it is grayscale.
snibgo's IM pages: im.snibgo.com

diegomage
Posts: 168
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: cant remove gray blobs of this image srgba to gray (update ) ?

Post by diegomage » 2017-10-14T12:05:47-07:00

I use all this filter in my image and WORKS and solve my problem
1) remove alpha

Code: Select all

convert image -alpha off  -type GrayScale -colorspace GRAY mmmm
2) convert srgb to rgb

Code: Select all

convert mmmm -colorspace gray -threshold 45% -depth 8  -type bilevel -set colorspace sRGB -colorspace RGB   +dither   -posterize 2  -threshold 99.9% -negate  zlineefndds.jpg
3) convert rgb to gray

Code: Select all

convert    zlineefndds.jpg   -set colorspace sRGB -colorspace RGB   -type GrayScale -colorspace GRAY -separate -average   png8:zzzz.jpg
4) posterize threshold and maximum contrast

Code: Select all

convert   zzzz.jpg +dither   -posterize 2  -threshold 99.9%  -brightness-contrast -0,50  zzz2
VERY THANKYOU FOR YOUR HELP

Post Reply