Gimp-Forum.net
Effect for softening gradients, such as after increasing image detail? - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Effect for softening gradients, such as after increasing image detail? (/Thread-Effect-for-softening-gradients-such-as-after-increasing-image-detail)



Effect for softening gradients, such as after increasing image detail? - Asterra - 08-31-2021

I think you know what I mean. Take a look at this sample image:

[Image: how-to-fix-these-gradients.png]

Specifically, how the shading gradually ramps up in brightness as it approaches the middle. It was rendered in 8-bit without dithering, and so suffers from an obvious contouring effect, despite taking more or less full advantage of what 8 bit has to offer. Th goal here is to end up with a replacement for this contoured shading that utilizes dithering to mask the limits of 8-bit color.


Here's the thing. I know I could get this done if I 1) masked off the parts I don't want to change, and then 2) applied a blur to the contoured component. I know. But I have hundreds of images that need to be processed in a similar way, so painstakingly masking every single one is quite simply off the table.

What I really need is some kind of filter that can intelligently identify this sort of low-bit-depth contouring artifact and transform it into a higher-detail gradient. So that I could for example convert the image to 16-bit, apply the effect, then downconvert it back with dithering, and get my result.

I feel like this is a common enough artifact that good solutions exist by now. I just don't know where I should be looking.

Thanks in advance.


RE: Effect for softening gradients, such as after increasing image detail? - PixLab - 08-31-2021

The filter you are searching for is Filters > Blur > Selective gaussian blur...
(Give it a try with the image you posted)
You do not need to select anything (no selection needed) as this filters blur only low contrast = this keeps details as they are high contrast, which is perfect to blur gradients only
-> see image below using default setting (yep it's a very bad jpg to fit size of the forum, but no more banding AND details are still there)
[attachment=6620]

Processing 100s images at once and assuming that your sample image is representative of your hundreds images...
I would suggest to install the plugin BIMP (Batch Image Manipulation Plugin) if you do not have it, it's a batch processor for GIMP, https://alessandrofrancesconi.it/projects/bimp/
once installed It's in the GIMP menu File > Batch Image Manipulation...
Then you can process hundreds of images using GIMP filters and scripts
setting below in BIMP "Blur radius = ~10-15, and a Max delta = ~10 should works fine, result https://imgur.com/Un9d5tf
There is no need to over blur or your gradient will just become a just a blurry "meh", it's all in the Max Delta
Max delta is what it is considering as high contrast (details) or low contrast, thus too high it will blur details, too low it will "see" banding as details and won't blur them Wink
[attachment=6619]


RE: Effect for softening gradients, such as after increasing image detail? - Asterra - 08-31-2021

Definitely works exactly the way I was hoping. The trick seems to be in the finetuning of the thresholds. There was only a very narrow range where it would perform the blur without sharpening edges to the point that they were essentially 1s and 0s.

Thanks for alerting me to this option.