Darktable - creating HDR merge

I’ve been trying to create merged HDR images in Dartktable using bracketed exposures with mixed results and wondered if more experienced users had any tips.

Firstly, I’m getting ghosting on some images around fringes. Maybe that’s because I’ve shot some of them handheld which I’ll avoid in future. Secondly, the merged image often contains muted or strange colours which are more difficult to rectify than usual.

I’ve had very little success with the tone mapping or global tonemap modules. So I’ve been sticking to my usual modules (exposure, filmic RGB, local contrast, tone equalizer). Does that sound right?

I’ve also tried a different route: creating an HDR merge in Affinity Photo instead and then exporting a 16-bit tiff into Darktable. It does a better job of aligning the images and preserving the colours. But it does mean that I can’t use DT’s chromatic aberrations module.

I’d appreciate any suggestions.

Have a look at How to shoot and edit real estate photos - #48 by aurelienpierre
Its explained there. Datktable doesnt align images - it just merge them. since it merge the images before demosaicing there might be fringes even if you shoot from a tripod. If shooting handheld you just get a pixelmashup.

2 Likes

Great. Thanks @MStraeten, I’ll take a look.

I’m in a very similar situation and currently the best for me is not to do the hdr in DT but with hdrmerge commandline

cd folder
hdrmerge -a -b 32 -B -p half -w 16105 *.raf

it will create the hdr based on the times with 32 bit dng and a white balance for fuji of 16105. The white balance changes with each different camera.

This gives me hdr images that are properly aligned, then I can further process them

Good luck and let us/me know what works for you.

Syv

4 Likes

16-bit half float DNG output of HDRMerge is more than enough to preserve all the data.

1 Like

Oh great. I’ll give this a go. How do you find out the white balance of your camera?

Actually, I used the wrong terminology. It’s not the “white balance” but the “white level”.

There’s a json file that gives the values, but I can’t find it right now.

Fuji is: 16105
Canon iso 100, 125: 13500
Canon iso 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000: 15200
Canon iso 6400, 8000, 10000, 12800, 16000, 20000, 25600: 15100

I only wrote down the Canon & Fuji since these are the cameras that I have.

Syv

Like I said it’s not the white balance but the white level. I finally found where it came from.

It comes from the Rawtherapee project with the data stored in:

camconst.json

Somewhere on the “great information highway” somebody mentioned that these are the numbers to be used with hdrmerge. And yes, it makes a difference. The hdrmerge dng file is much better by specifying the white levels.

Syv

Unfortunately at least for canon its specific to the model:
You can find the values used in darktable here: rawspeed/cameras.xml at develop · darktable-org/rawspeed · GitHub

And for rt: RawTherapee/camconst.json at dev · Beep6581/RawTherapee · GitHub

1 Like

I personally use Hugin for this. First, I export the images using darktable with only lens correction enabled, to 32-bit floating point TIFF in linear Rec. 709, then I open the TIFFs in Hugin, assign them to the same stack, use “Align image stack” to create the control points, optimize “Positions and translations”, and export with rectilinear projection to an HDR TIFF or EXR, which I then import back into darktable and process as I would a RAW file.

1 Like

I do wonder if there is a workflow with Hugin that is colour managed and scene-referred. I don’t think I have a grasp of that yet if it is possible. A discussion for another thread.

I think the workflow I described pretty much is. When importing floating point images, “Response type” is fixed to “Linear” in the photometric optimization tab, and the HDR files obtained by merging seem to behave as they should.

Okay, I will take another look sometime in the distant future. :stuck_out_tongue:

I also created a plugin for HDRMerge. It resides with all the other scripts here:

I still run this on my local machine without issue, but I must say, I unfortunately have far less time on my hands these days than in the past (due to a growing family) so I may not be the most responsive if you experience difficulties, apologies in advance!

4 Likes