Page 2 of 2

Re: Removing All Shades of Grey from an Image

Posted: 2019-05-22T13:24:56-07:00
by fmw42
You cannot post https URLs as images on this forum. It does not support that. You will need to change them to links. I have edited your post above.

Re: Removing All Shades of Grey from an Image

Posted: 2019-05-22T13:27:50-07:00
by fmw42
Which part of your command do you want to change? The input image or the mask you create. Please clarify where you need the change.

Re: Removing All Shades of Grey from an Image

Posted: 2019-05-22T19:29:25-07:00
by GeeMack
OmahaWxMan wrote: 2019-05-22T10:51:32-07:00After more testing I realized that I can't entirely drop the black channel from the CYMK separation. [...] To my novice eyes, adding a second +clone line and fuzzing the K-channel to a few percentage points of #000000 would work, but I'm not sure how to pull that off and then combine both into the intended results.
There are a few ways to isolate all the white inside another set of parentheses, then composite it over the result you have so far. Here is an example command showing one idea...

Code: Select all

convert input.png \
   \( -clone 0 -colorspace CMYK -channel CMY -separate -evaluate-sequence add \) \
   \( -clone 0,1 -alpha off -compose copyopacity -composite \) \
   \( -clone 0 -fuzz 50% +transparent white -blur 0x0.5 \) \
   -delete 0,1 -compose over -composite result.png
The command starts by reading in the input image.

Then it removes the black from CMYK to make a mask inside the first parentheses.

Next it applies that mask to the input image to more or less get rid of the grayscale and keep all the colors.

The input image is cloned again inside the next set of parentheses, and everything is made transparent except white. A fuzz value determines how pure the white must be to keep it. A little blur is applied to the result.

Then it deletes the original input image and the mask because they're no longer needed. It finishes by compositing the white layer over the color layer and writing the output result.

Re: Removing All Shades of Grey from an Image

Posted: 2019-05-23T07:26:33-07:00
by OmahaWxMan
Thanks for editing my above post, I'm a bit confused though, I've only submitted HTTPS images and they seem to be showing up fine. However, it may be due to my permissions in Google Photos, I moved the two photos to a different album and they should be OK now.

Thank you, GeeMack, for the new convert command and the explanation, that's exactly what I was trying to do on my own and reading the documentation but didn't quite get.

Here's one more image using the updated convert command.

Image

Re: Removing All Shades of Grey from an Image

Posted: 2019-05-23T07:50:45-07:00
by fmw42
fmw42 wrote: 2019-05-22T13:24:56-07:00 You cannot post https URLs as images on this forum. It does not support that. You will need to change them to links. I have edited your post above.
I could be wrong about this. I have seen this issue numerous times and assumed it was the https, since it was always those link. But you could be write that it is just permissions.

Re: Removing All Shades of Grey from an Image

Posted: 2019-05-23T11:01:10-07:00
by OmahaWxMan
I just updated the previous image's URL with the one from my shared Google Album and it's working now.

Thanks again for all the help!