Highlight reconstruction darktable vs. rawtherapee

Hi I,m using darktable for quite a long time now. Over all I’m extremely happy with everything. The only part where I sometimes still struggle a lot, is highlight reconstruction.

Here is a picture I’ve developed with raw therapy. I tried really hard to get a result in darktable that comes near to this (regarding the reconstruction of the sky). But all I tried is far away. I don’t know if it is me or darktable whose capabilities are insufficient.

2014-05-30_19-47-01.cr2 (22.9 MB)


There has been a lot of work to improve the highlight reconstruction in Darktable recently. Guided laplacian highlight reconstruction was introduced in 4.0 and another method is in development.

@hannoschwalm you might be interested in this.

This is the best I can do now with dt 4.0.0. Using filmic reconstruct I got a strange yellow halo in the sky above the yellow tree that I could not fix, so I tried reconstruct in LCh adjusting the clipping threshold.

2014-05-30_19-47-01.cr2.xmp (21.2 KB)

That’s anyway quite good! Far better than my tries. Thanx for the sidecar.
Seems i still have to lean some things.

1 Like

People mistake highlight reconstruction (needed when your sensor clipped and you have no data in the highlights) or actually getting details to show in the highlights that are recorded. Darktable is actually one of the best around in reconstruction I’m guessing . But people struggle to get details showing in a way that they find pleasing .

If things are not clipped with filmic , it’s often 'getting details ’ that is the issue . Although every case is different or course ,often what you want is local contrast , but then (only) in the highlights.

So using a local contrast method and activating the parametric mask to only apply in the lighter parts of the image will do what you want , I’m guessing.

I use the local contrast module, set to the bilateral mode. I set the contrast to 3 (real low, i type it in by right clicking often ) . The detail slider can then be pushed real high. Like over 300%. Don’t br afraid to over do it. Then use the parametric mask to select an L range that is in your sky. You can adjust the final mask opacity to fine tune how much of the effect you want.

(Disclaimer , i haven’t looked at your CR2 so no clue if this is really your problem :slight_smile: )


@Iain thanks for hinting, still awake?

Hi Popanz,
I share your difficulty with highlights, and am impressed with the result you got with RT.
Here’s my go trying to replicate (more or less) the colours and tonalty of your version. But whatever I do to try to recover the highlights turns pink! I don’t know whether I’m doing something wrong or not… so here the highlights are burnt out :neutral_face:
Now I have a new problem: I just exported my version, but the colours are off.
It should look like this:

but is looks like this:

2014-05-30_19-47-01.cr2.xmp (19.6 KB)
what have I done???
Edit: the screenshot doesn’t look like my darktable view either! Too magenta. I guess I must be running into colour management issues on this one. But I’ve never had the first problem before.

I would not agree here, in fact I think that highlights handling is darktable’s weakest point in v4.0
The new laplacian works very well for specular highlights but not for large areas.


I’m also quite often haunted by the magenta madness. But 7osemas sidecar is a good starting point. Even so I’m still working on his sidecar to understand, how to get the magenta shift reliable under control.

But if you really need to reconstruct (and again, people often confuse reconstruction for ‘getting details in bright areas’), the options in rawtherapee are a few options that seem very similar , if not the same , to clip / lch / color.

The real reconstruction options in RT are older and fewer than Darktable … But what to do with that reconstructed data is were people are stomped (the search for the old faithful highlight slider as they call it )

I think the magenta is there because of filmic preserve chrominance option.
I did a more straightforward edit only to reconstruct and recover details the highlihgts.

  • Adjust exposure.
  • Auto tune filmic and set preserve chrominante to ‘no’.
  • In the highlight reconstruction module, set it to reconstruct in LCh and adjust the clipping threshold.
  • Tone equalizer to recover highlights.
  • Local contrast.

2014-05-30_19-47-01_01.cr2.xmp (8.6 KB)

I think there are different reasons for the miscolours.
One you already mentioned. The second one is the colour calibration modul. If I have this activated, I can’t get proper colours in the highlights.

That’s my next try, still trying to get some colour in:

2014-05-30_19-47-01_01.cr2.xmp (14.9 KB)




@gaaned92 ART is based on RT as far as I know. And yes for me it proves, that the highlight reconstruction in RT gives you a more natural look. To get all this details in dt you loose colour in reconstructed areas. I hope, that the mentioned future method will bring some improvement.

1 Like

Well, it’s always because of a sensor being clipped, so shot with too much exposure.

Where in the pipeline you notice it can be different, but the cause is always the same as far as I know.

One thing i sometimes do is to load the file with the very bare minimum of enabled modules (which is, white balance , demosaic and orientation if i recall correctly ?). Now enable exposure , and lower it till the the highlights are all visible. If you have a clipped sensor , it’ll show.
I then have the choice to fix it right there (enable highlight reconstruction and see what i can get , then set exposure how I want it and continue as normal ) or try to smooth it over with filmic’s ‘inpainting’. Or a blend between the two, but that’s only if i have real troubles and really want to make something of the file.

I do my chimping/selecting with FastRawViewer , and it gives a good indication of sensor clipping. Most files that have some where I don’t expect it , don’t even make the cut to end up in darktable.

That being said : for easy mode, the color reconstruction mode is a simple on/off for me: set it, do i like what it does ? Keep it and done. If not, do not use it.

Filmic’s V6 luminance Y mode (and the ‘no’ mode? Not sure ) seem to render bright spots like that as white without reconstruction. The gradiënt towards the clipped area is not always as smooth as I like, but filmic’s reconstruction/ inpainting is doing good things for that.
When i prefer the look of maxrgb or on of the other modes , i need to deal with the magenta highlights.

Never have I seen the 'color calibration ’ module being the cause of the issues.
Yes, it can bring it to the front , but you have it anyway .

Your sensor can only capture so much light. So after a while , you would just get ‘max, max, max’ for r, g, b values. But then white balance has to be applied , which multiplies some of those channels , so you end up with something like ‘max * 2.5, max * 1.5, max’ for the channels. That’s the magenta look.
If color calibration is doing the white balance , it’ll seem to cause this.

But if you do not use color calibration, and use the white balance module instead , now that will cause it. You simply can’t set the desired white balance without the highlights going magenta. You could clip those highlights early on if you decide there is no detail worthwhile there and ‘plain white is also fine’. But then I often just use filmic’s luminance Y mode to get something of the same.

You could also just leave it as is, and use gimp or affinity photo or Photoshop or something else with good inpainting to replace the magenta part completely :).

One issue is that darktable has a wrong value for sensor saturation. If I enable the raw clipping indicator, I get no pixels marked – not until I drop the white point to 13583.

2014-05-30_19-47-01_02.cr2.xmp (17.4 KB)


One without the resource-intensive Laplacian HL recovery:

2014-05-30_19-47-01_02.cr2.xmp (19.6 KB)


Single color channels blending with the tone eq and even the tone eq with the right mask go a long way for highlights but it can take 4 or 5 instances

@kofa you are absolutely right. AP and me have also discovered that, for some images current dt just takes a wrong whitepoint. Don’t know yet what the exact issue is, just knowing the “symtom”.

That explains my endless magenta problems with this image! Thanks. The wrong
white point gives the highlight reconstruction module the wrong reference.
Here’s my try now, including @jorismak 's great tip about local contrast.

2014-05-30_19-47-01.cr2.xmp (23.8 KB)
edit: another (slightly) more careful version!

2014-05-30_19-47-01.cr2.xmp (26.5 KB)

1 Like