Contrast Management RGB : A new scene-referred approach (POC)

THX for sharing your thoughts Christian … I do fully understand your thoughts . Specially to discuss this AI stuff here in your thread … there is enough of these things going on in other threads .
I give you all the time … personally .
Would it be ok with you … if I compile it for myself , if I can manage ???
Just for personal use …

Have a nice weekend

Andreas

1 Like

Hello,

After careful consideration, as a free thinker, I have decided not to impose my vision by removing the AI integration. However, the models will not be pre-loaded or automatically fetched ; users who wish to use these features will need to download the models manually from the darktable github. This ensures that the use of these tools is a conscious and informed choice on the part of the user.

Here is the link to the latest version

Greetings from the Luberon :herb:
Christian

5 Likes

Wise decision … of yours !!!

2 Likes

Has this module’s development now come to a halt?

The discussion has certainly gone quiet on github. @jandren how’s it going over there :slight_smile: ? Wish I could help but I have zero relevant programming skills…

Hello,

Just so you know, I haven’t given up on developing this module; I actually fixed a bug related to masks yesterday.

The code is available on GitHub, along with the latest version of my experimental fork.

Greetings from the Luberon, :herb:
Christian

2 Likes

Hi Christian. Glad to know you’re still thinking about this, and that you kept the fix as an individual commit so we can all keep track of it more easily.

I just noticed that with contrast & texture (the version in the pull request, without including any newer fixes), the snapshot looks slightly different than the live image. The workflow is: enable my preset in c&t, take a snapshot, turn the snapshot on, and I can immediately see snapshot is brighter in the highlights. It happens with or without high quality processing enabled.

Is this experiment fairly safe to install and run now without special options? I’m going to keep using my own darktable build, but I’d like to check if this issue can still be reproduced, and try to do it with a publicly available raw file.

1 Like

I just use the " experimental build " till its been started …
So far no issues … for the most part .
Here on Mac m1 … no special options needed .
Running quite stable from my POV
You get your own config folder for the build … no interfering with DT at all .
Well just my experience

3 Likes

I found this does not happen in your experimental version so you must have already fixed it.

1 Like

Hello,

Thank you for your feedback. I think that was the same bug I noticed in some of the exported photos.
Since the last update, the module seems to be working properly.

Greetings from the Luberon, :herb:
Christian

Need to check that fix out then!

I have been working on a mergable first step late evenings, making progress but takes some time. Been spending a lot of time with the noise handling, do you have any examples of when it works well on high ISO images Christian?

8 Likes

Hello,

Thanks for the request. I revisited an old treatment and, to be honest, I was a little disappointed with the results.
So I spent the evening going over that small block of code and decided to try a different approach: adjusting the gain based on the pixel’s luminance.

// Noise protection — attenuate local contrast gain in low luminance
if (d->noise_threshold > 1e-6f) {
     const float floor = d->noise_threshold * 8.0f;
     const float ratio = fminf(lum_pixel / fmaxf(floor, 1e-6f), 1.0f);
     const float attenuation = ratio * ratio * (3.0f - 2.0f * ratio);
     correction_ev *= attenuation;
     }

We could reduce “noise_threshold” down to * 5.0f, but I still need to run some tests.

My goal isn’t to work with high-ISO photos, there are other modules for that, but to protect the shadows and blacks without introducing noise in the low-light areas.

Here’s an example using an image from a Playraw
In this example, I pushed all the local contrast sliders all the way up, so you can clearly see that I created noise in the blacks, and on the right side, we removed it using the “noise threshold” slider.

In this second screenshot, I disabled the “Contrast & Texture” module, and we can see that the noise present on the left side was indeed created by excessively increasing the 5 sliders


The code is available on GitHub, along with the latest version of my experimental fork.

Greetings from the Luberon, :herb:
Christian

4 Likes