Introducing a new color balance mode in darktable

@anon41087856 - thanks! for clarifying the code.

I tried the saturation option and thought the results were visually pleasing, though there was quite a bit of clipping in the shadows of the particular image I picked as a sample image.

My sample image was a red apple, shot raw, no other processing in darktable beyond the bare minimum to interpolate the raw file, and specifically no “make it pretty” options such as the base curve or sharpening, and using the default dcraw camera input profile.

Would it be possible to add some sort of saturation mask to the algorithm to help reign in any otherwise resulting out of gamut/clipped channel values when using the saturation slider?

I think darktable allows adding a mask as a separate step, but I was thinking about something like a checkbox to apply or not apply an automatically generated saturation mask. There are ways to construct a pretty good sat mask using just RGB, but I don’t remember the procedure - an internet search would probably turn up the calculations.

If I understand properly, to see the output of unbreak I choose the ouput linear way, while to see the output of color balance (or any other classical dt module) I choose the gamma way. Is that correct ?

What clipping ? Gamut or dynamic range ?

darktable has that already within the parametric blending options.

I think what you are looking for is the vibrance module, it does exactly that.

As a temporary hack, yes, but my fix to get the true readings has been merged in master today so you don’t need to do that anymore, as long as you don’t use LittleCMS, the readings will be right in both cases. That one with LCMS is harder to fix.

What does grading involve? I think by grading you mean applying a look to the scene-referred image/footage? Perhaps using a LUT?

And I think you are saying grading is done?/is best done? on log-encoded data rather than linearized data?

What does “display-ready transfers” mean? I think you are talking about taking the already-graded image/footage and applying a LUT to map the graded output to make it suitable for display on a preselected display device?

grading is that powerful technic : http://juanmelara.com.au/blog/the-summer-blockbuster-colour-grading-tutorial

Hi @anon41087856, thanks for the link! Very informative. I think it would be very interesting to see how this translates into a darktable workflow using the new tools that you are developing. A little demo would be a great way of highlighting the advantages over a more “traditional” (“display referred”? “wrong”?, I don’t know how to call it actually :slight_smile: approach.

For my part, I tried to work with the tools that I know, which is essentially just RawTherapee. Here’s my way of trying to emulate what is shown in the tutorial you posted (just to be clear: without any ambition of being comparable!):

And here are the before and after pictures. The raw file is at http://rawtherapee.com/shared/test_images/woodstock_people.pef. I think it should be free to use, it’s part of the RT test images – if not, I hope @Morgan_Hardwood will clarify.

What would be the darktable way? Thanks!

3 Likes

@agriggio very good video! Demonstrates how to use the new tool in an easy way using a real-life example.

Note that the video wouldn’t play the way it is embedded in the post. I had to right-click on it, “Copy video address”, then go to that address.

I took the photo and feel free to use it for open-source testing purposes.

Thanks for confirming! :+1:

do you know the proper way of doing that? I simply added the link, pixls did the rest… but if there’s a trick to make it work, let me know and I’ll edit the post.

I think you did it properly, the forum software just failed to work properly.

It translates in darktable straightforward, the only difference is the 2.5 D color wheels of Resolve are 3 × 1 D sliders in darktable. I hade even embedded a default style to produte just that teal-orange look.

hi,

I’d still love to see it in action… do you have examples that show to the uneducated (that would be me) the benefits? I’m trying to understand. I know you posted some examples earlier (or maybe in a previous thread) but iirc there was no raw/source pic attached to try things out. thanks in advance!

@phweyland, are you using colord or xatom to fetch the system display profile ? I think I have spotted a bug with xatom that applies the gamma correction of the display twice on the same picture. Using colord, I still get wrong color picker values (but that’s expected, and I know why - bad but under control), but the image looks as it should. Can you reproduce ?

@agriggio sorry, no time for that at this point, feature freeze is coming, and big colorimetric errors need to be fixed asap. Critical stuff (at least for me).

no worries, I understand. fwiw, I just implemented a basic log compression in (my copy of) RT, so I can experiment while trying to understand what’s going on… I’ll report here when I have something if anyone is interested

3 Likes

Sorry, I don’t know and I cannot check for few days. Not sure that I can choose on Windows, but in any case I’ve kept the default value. I’ve tried to select the specific monitor profile but dt doesn’t retain it from one session to the other.

Some little info ? :slight_smile:

Grading could be just the simply rgb curves or brightness/contrast sliders.

I interpret it in this way:
“You can grade on Log too with benefits compared to grading rec709 gamma transfers where the tone distribution is intended for viewing and not for processing( with a base curve and a lot of post processing like jpegs from camera).”

1 Like

@Morgan_Hardwood, @agriggio - I’ve manually just dragged and dropped the video into @agriggio’s post so the file is hosted here now and should embed fine.

I’ll investigate why it didn’t fetch it.

1 Like

What about some results ?

This is with default orange-teal colour-grading I have added as a preset in the color balance, + the filmic module I have developped these last few days with the help of Troy Sobotka (who is now estranged from here and yet was one of the few helpful, accurate and relevant contributors).

6 Likes

@anon41087856, really good! :clap: :clap:
looking forward to trying this out

@anon41087856
I have started to code a color correction module in photoflow, based on the ASC-CDL formulas, with the idea of making it compatible with the DT tool (I.e. same parameters = same output).
However, the DT code seems to deviate from m the recommended implementation in at least two places:

  • if I understand correctly, the RGB parameters are always re-normalized to keep the luminance unchanged. Is that correct? Would it makes sense to make this optional?
  • looking at the code it seems to me that the saturation step is applied before the SOP. However, all the documents I have found recommend the saturation adjustment to be the last one. Maybe I have mis-interpreted the code?