I had problem with your command, so I changed the level back to my setting to work. Also I have increased the fuzz, because it was not selected enough.
Here is how it looked when I increased fuzz:
http://i46.tinypic.com/2jg81p5.jpg
The overlay method does not look good to me, so I tried blending method which you recommended to me. But I do know know how to write it correctly here so it does not work:
Code: Select all
convert original.jpg ^
"(" -clone 0 -level 0,212,0.87 ")" ^
"(" -clone 0 -fuzz 25% -fill black +opaque "#82b068" -fuzz 0 -fill white +opaque black ")" ^
-compose blend -define compose:args=50 -composite
This is on Windows and I changed the \( to "(" to work the command.
Edit:
Ah, I must add the alpha channel. OK. So the first command works now. And could we try the blend command if it could work?
One more thing I had to change in the script. Not the +opaque but -opaque to get the higher contrast on whole image.
Code: Select all
convert original.jpg ^
"(" -clone 0 -level 0,212,0.87 -alpha set -channel a -evaluate set 68% +channel ")" ^
"(" -clone 0 -fuzz 25% -fill black -opaque "#82b068" -fuzz 0 -fill white -opaque black ")" ^
-compose over -composite repaired.jpg
But the result is still not as I intended. For some reason the black area which is black in mask (see darker_colors.jpg) has too suppressed contrast now. I originally wanted the image to have higher contrast, but the result is almost unnoticeable. Only the area which has higher brightness of greens should to be suppressed.
As far as I understand to your command, you changed contrast only to the light greens? But what I want is to change contrast to whole image, and the areas which would be too light green would be overlayed cca 60%-68% of the original lightgreen selection.