Page 1 of 1

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

Posted: 2017-10-13T21:53:18-07:00
by diegomage
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

Re: cant remove gray blobs of this image ?

Posted: 2017-10-13T22:03:48-07:00
by fmw42
Your original image is empty? Have you posted the correct image? Your output mmm needs a suffix?

Re: cant remove gray blobs of this image ?

Posted: 2017-10-13T22:12:21-07:00
by diegomage
is original there are blobs black in the image with blobs gray

Re: cant remove gray blobs of this image ?

Posted: 2017-10-13T22:13:55-07:00
by diegomage
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

Re: cant remove gray blobs of this image ?

Posted: 2017-10-13T22:14:56-07:00
by diegomage
the extra image is my image enlarge for show the gray blobs in the image

Re: cant remove gray blobs of this image ?

Posted: 2017-10-13T22:47:01-07:00
by fmw42
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 .

Re: cant remove gray blobs of this image ?

Posted: 2017-10-13T22:52:11-07:00
by diegomage
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

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

Posted: 2017-10-13T23:08:09-07:00
by diegomage
I see the format of my image and I view that this is SRGBA ; exist any way to convert to grayscale ?

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

Posted: 2017-10-14T00:30:19-07:00
by snibgo
Exiftool says the supplied image file, qMTdc.jpg, has only one color component. So it is grayscale.

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

Posted: 2017-10-14T12:05:47-07:00
by diegomage
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