Enhancing local contrast vs. global contrast.

tutorial

#1

Here is a little techniques I have been using extensively lately to enhance local contrast vs. global contrast, using the great color to gray tool. It is fairly easy and fast.

Starting point, a picture with strong global contrast

Duplicate the layer and desaturate it (copy this also into your channles stack for easy acces as mask). Invert the desaturated layer and set it to overlay mode. this will minimize global contrast (and also local contrast). Here is the result setting it to an opacity of around 50%.

Duplicate the original image again and apply the color to gray (C2G). Set this layer in overlay mode, this will bring back all the local contrast you want (actually too much). Apply a luminosity mask (remember the last step) to this layer. With the curves tool on the mask select the areas where you want the local contrast to be strongest. I roughly selected the darks without totally deselecting the lighter parts. I then set the opacity of the layer to around 50%.

Here is the direct comparison between starting point and what we have done up to now:

Now you have a globally flatter image with all the local contrast you want. This is a great starting point to add vignetting and placing things in the foreground that weren’t there in the beginning. Here’s an example of what I came up with just adding some more saturation and a bilateral gradient in soft light mode:

Hope this inspires you…
Cheers


[PlayRaw] Busy doorstep
Clarity vibrance in RT
Highlight and midtone control like Luminar's capabilities
Report of a shooting
Proposal for Raw Therapee Tutorial Site
Enhancing local vs. global contrast - RT wavelets
#2

A good reminder that many things are achievable using simple techniques.

There are so many ways to make a grey scale image that it is interesting to see what people choose as part of their workflow. @McCap It would be great if you shared the desaturation and c2g steps for the curious. @patdavid wrote an excellent article about Digital B&W Conversion in case anyone is interested.


(Pat David) #3

C2G is a super-neat algorithm for replicating visual local-contrasts for sure. (Careful, much like HDR tonemapping, it’s easy to overdo).

Not surprisingly, @McCap uses good taste and judgement in his examples. :wink: :clap:

I just wish it didn’t take forever to process…


#4

@afre, honestly I didn’t waste one thought on the desaturation method in this example.
The first thing I do in any Gimp processing is always duplicate the image and use:

colors -> desaturate -> desaturate (mode:lightness)

This gives me the layer for my contrast modifications and also gives me the so called L mask. I generally just use this one luminosity mask and and select the regions I want using curves.

Then for the c2g I did:

colors -> desaturate -> color to gray

I just used the standard setting. The result is totally over the top. That is why I mask it with the above mentioned luminosity mask and select the intensity of the c2g layer for each luminosity region using the curves on the mask.

Really fast and simple. :slight_smile:

@patdavid, yes it is very easy to overdo…and thanks for the nice words.


#5

Thanks for sharing :slight_smile:. Just thought it would be nice for people visiting the tutorial to know how to get from point A to B. Personally, I sometimes generate multiple grey scale outputs and select the one I think is the most beneficial for the task at hand.


#6

Unfortunately, c2g is an exactly so excellent as sloooow tool…


(David Oliver) #7

I love that result, @mccap. Thanks for sharing.

For anyone who, like I was, is wondering what C2G does, there’s an explanation here by @patdavid.


(Jules M) #8

This is great and I’ve been playing around with your original image following your steps to get to your final image. But I’ve got a question. Could you give a screenshot of the curves that you used. That’d be really helpful if not too much trouble as I’m finding this technique quite instructive. Cheers, Jules


#9

I can’t show you the exact curve as I have used them on the luminosity mask, so now it is "in the mask"
Basically the C2G layer looks like this:

I like the details in the building and the foreground, but if I apply this to the picture the sky is just too much. So I use a mask based on the luminosity mask of the basic image. I use a curve to make the mask such the the C2G layer is works on the building and the foreground, but not so much on the sky. So in the end my mask looke like this:

Which resulted in my C2G layer with mask looking like this:

Here’s the overview of all my used layers:

I hope this helps :slight_smile:


(Jules M) #10

Many thanks - very helpful - much appreciated. Jules


(Royi ) #11

Hi,

Could you explain what’s C2G and bilateral gradient?

Thank You.


#12

You can find it in Gimp 2.9.5 under
->colors->desaturate->color to gray

A bilateral gradient is a gradient that has one color in the middle and another on both sides. Select the gradient tool in Gimp. Once selected different options will appear, like linear, radial etc…and bilateral. Set the foreground color to neutral gray and the background color to black. Take a look at the “vignetting” layer in my image of the used layers


(Isaac Ullah) #13

@McCap Many thanks for the tutorial! I was, in fact, just recently struggling with how to make a local contact adjustment in GIMP. In fact, I’d given up and just gone back to darktable to do it. But, as your method shows, there’s ALWAYS a way to accomplish something if you know what you are doing, lol!


(Brian Innes) #14

@Isaac, a quick way to do local contrast enhancement in gimp is to do unsharp mask, with a large radius (60 pixels upwards) and a small amount (less than 0.3)


(Isaac Ullah) #15

@Brian_Innes Oh wow. Brilliant! I was.messing with unsharp mask, but didn’t think to combine across scales. Simple and elegant!


#16

LightZone’s Local Contrast “style” is actually the Sharpen (USM) tool with 50 px (by default) radius, a small amount (0,15) and some threshold (20).