Best practice for "unexpected white balance coefficients" in darktable

Yes, that is actually better, though I had to turn the strength way down to 2.41 and preserve shadows all the way up to 1.8:

I still think the stone looks a lot better in the jpeg, but have a hard time understanding/articulating why.

I think the jpg has more saturation and contrast - I’m not sure whether more local contrast (could be applied with diffuse and sharpen or local contrast) or or more overall contrast would be better.
My approach is to increase contrast globally (I use sigmoid but I think the contrast slider in color balance rgb might work well too), then use tone eq to pull the highlight and shadows back in.
I just reopened the edit I did before on this image, turned on profiled denoise, and noticed that it hasn’t got a noise profile for this camera. For most cameras it will automatically go to decent settings, but with this one (maybe too new?) you have to set it manually.
Anyway, here’s a screen grab of that bit on my version.
image

I didn’t worry too much about the highlights though, as I didn’t feel they added much to the image. I’m not sure how much this affects things.

Edit: just pulled the highlights back a bit more with a second instance of tone eq, also tweaked the highlight saturation down a tniy bit in color bal rgb.
image

Ya it depends on the image for sure I often use the denoise at a strength of less than 1 and even as low as 0.25 if I am doing luma denoising as it can be hard on details… I sometimes will use only the chroma preset and adjust that as needed to just remove the noise… The I will use surface blur which is really the old bilateral denoise and astrodenoise which is a non local means method… I find these are good for fine noise… you can also use the contrast eq to tweak noise …so there are a wealth of methods… The youtube videos… I think there are 3 maybe 4 on denoise and the chromatic aberration made by rawfiner the module author… the one he did for v 2.6 of DT is very nice and explores denoising in great depth showing all methods that have since been refined but the approaches demonstrated can still be used…

Okay, thanks to everyone’s help, I have an edit that I think rivals my camera’s jpeg in terms of vibrance. (Maybe I even went overboard, but that’s a different discussion.)


lisbon_night.xmp (13.5 KB)

Here are the various things I ended up doing:

  • I just set the white balance by hand in color calibration until the side of the building looked like approximately the same color as the camera’s jpeg (conveniently using a snapshot of the jpeg to compare).
  • At 400% magnification on the side of the building, used denoise profiled (despite the lack of a profile for my camera) with wavelets, a lowered strength of 0.2, and increased preserve shadows of 1.80 to get rid of the annoying color noise in the wall.
  • Darken a bit by increasing white relative exposure in filmic rgb.
  • Used a second exposure with a path drawn around the shadow just to darken the sidewalk a little to make the colors pop more.
  • Used the dehaze profile of diffuse and sharpen with a mask that applies mostly to the building to bring the texture back to the building wall, and give a sense of depth for the building behind the tree.
  • Used the surface blur profile of diffuse and sharpen on the lower part of the picture to blur the sidewalk slightly, so as to avoid drawing attention with the texture. Used a drawn and parametric mask to exclude the reflected lights.
  • Starting with the vibrant colors preset of color balance rgb: first reduced the mask middle gray fulcrum and contrast fulcrum so that the reflected lights are entirely within highlights. Then increase contrast and global saturation to get things really colorful. Increase brilliance of highlights and decrease for midtones and shadows to add even more contrast.
  • Finally, because I wanted that reflected tail light to pop, I just used a display-referred color zones with a drawn mask to shift the color from orange to red.

The one thing I really couldn’t understand about the camera jpeg is how the illuminated tree at the right edge of the photo is completely red. It almost seems like an error, except I like the effect of the red tail light on the left and red tree on the right. Does anyone understands why my camera might have done this and how to replicate it in darktable.

Anyway, I’m still learning, but at least now like my edit more than the camera’s jpeg. If anyone has more suggestions please let me know. I still need to get a better understanding of color balance rgb. I now understand technically what the different controls do, but I still don’t have a good sense of, say, when creatively you want to use saturation rather than chroma, or chroma rather than vibrance. I’ve watched a ton of Boris Hajdukovic videos, and every time that he goes into color balance rgb and starts clicking it feels like magic–I see what he does to make the colors look great, but I have a hard time understanding why he chooses, say, to increase global chroma and then decrease saturation in the highlights rather than vice versa (increase global saturation, decrease chroma).

1 Like

Well, I don’t know what to do. I showed the images to non-photographers and got completely rejected–people really prefer the jpeg to the edited raw. In particular, one thing people pointed out is how much more detail the jpeg seems to offer in the highlights compared to the darktable output. Indeed, the curtains and the plants on the balcony show way more detail in the jpeg than in darktable.

Here’s a blow-up of Sony’s jpeg:

Here’s what I’m getting from darktable:

I tried fiddling with diffuse and sharpen, even adding local contrast on top of diffuse and sharpen, disabling denoise, playing with contrast. I just can’t replicate those crisp vertical shadows in the grooves to the right of the left window, or the detail in the folds of the curtain, or how sharp the plants are.

Is it possible that Sony just knows their camera sensors better than anyone else, so third-party raw editing can be better for creative choices but is never going to beat the jpeg in terms of fine detail for approximately properly exposed photos? The bummer is that I wasn’t pixel peeping when I got this feedback. I showed the photos full screen on a 14" laptop (in portrait mode, so with lots of wasted space), but someone was easily able to see the lack of detail in the window.

Just look at the saturation…way too much in DT in your highlights in this region compared to you jpg…draw that back and balance your exposure and see where it is… also what xmp goes with this edit… share that and we can see what modules and settings you are using for this example…

I can’t recall if I submitted an edit but I was looking at your comment about the red in the tree and was playing around the other night…just opened DT and looked at where I left the edit… seems like lots of detail similar to your jpg example in my version and I am not sure I was even trying to address that aspect… Color may be off as I was messing with that but for sure lots more detail on those curtains is not hard to get…

I think, from when I had a go at this image, that it’s partly down to highlight hue shifts - sigmoid can replicate this btw - and partly down to something like the camera profile. It’s pretty easy, although a bit unintuitive to shift colours a little in color calibration with the channel mixer, which effectively is tweaking the color matrix or whatever it’s called.
IIRC I did that in the edit I posted on this thread, so I won’t try to explain at this point… :sweat_smile: Happy to answer any questions though!

I had sort of landed on this lighter version a few days ago and the windows were not as warm as your edit.

Or it could simply be a bit darker


Obviously when you have lights then wb and exposure are going to impact the look so you could make this more yellow very easily…

20221106_0058.ARW.xmp (11.7 KB)

Sorry I forgot to specify it was the same xmp I posted here:

I did play with saturation, as well as adding a little cyan to highlights in the 4-ways tab to my highlight colors to match. I only posted a snapshot from the previously posted xmp because nothing I did improved things. Would you mind posting your xmp?

It was in the post… I think the first one had an exposure of 1.7EV… the xmp was likely updated to what i used for the lower one… maybe default 0.7 ev??

That could be Filmic.
Try to play with the following: Shadows - Highlights Balance in the Look tab, Preserve Chrominance and Contrast in Highlights in Options.

The highlights of the JPG are brighter, so contrast is higher. There is not much real detail in those curtains, so don’t try to preserve too much. The higher retained saturation also means more colour casts – see the greenish tinge on the window frames.

Okay, my new strategy is:

  • Absolutely crush the highlights with tone equalizer to recover detail in the windows and curtains.
  • Use a color balance rgb with a mask to boost the midtones of the reflection on the sidewalk. Also just a tiny bit of hue shift to make the red redder and the green greener.
  • Use a second color calibration with a drawn mask to make the tree and lighting a bit red on the right-hand side.
  • As before, sharpen the building with diffuse and sharpen.

I’ve found at least one person who prefers the latest image to the jpeg. The one thing that looks better to me on the jpeg is the car–somehow the door handles pop out more and the car is less red in the jpeg. Other than that, maybe this is a decent edit?


lisbon-2colorbalance.xmp (13.7 KB)

Any feedback appreciated.

1 Like

It looks good to me! Having said that I liked your last one too. :+1:

My attempt

Not sure what you did on export but your JPG is bigger than the raw… JPG should only be around 2MB or so here for review and comment to ease on storage requirements…

I just clicked “export” in darktable, and used the default settings. JPG is about 10MB, while the raw is 33MB. Should I reduce the dimensions on export?

And, when exporting, a quality setting of 85 - 95% is good enough. 100% blows up the file size, without actually being lossless.

[Edit: the question is from Frisco, but the huge file came from @alain.]

1 Like

Sorry my reply was for @alain The jpg is 63 mb and it looks like quite poor quality so I was wondering how it was exported…

Sorry, wrong values in export module. If this doesn’t fit, how can i erase the photo ?