How can i merge these three CR2 images to an HDR without them turning bright pink?

IMG_0197.CR2 (31.8 MB)
IMG_0199.CR2 (35.5 MB)
IMG_0198.CR2 (28.3 MB)

I have tried so many ways to combine these three images to make an HDR image, but whatever I do, the result is just pink. What am I doing wrong? I am using Darktable 4.4.0

Welcome!

There was a bug in HDR creation, you need to upgrade to dt 4.6.1.

See also HDR DNG Export to jpg problem

Thanks!
Once I figure out how to update my Darktable on Rocky Linux, I’ll try this. I am already on the latest in the repo.

That aside, it looks like you have a more basic problem (for HDR, that is): in all three images you have hard clipping in the sky between the trees.

That said, and depending on the intended use, I’m not sure you need HDR for this particular image: only 2 of the channels are clipped in an area that’s not all that interesting visually, and noise isn’t a problem either.

1 Like

I have a large set of these images, I want to make them all HDRs for later processing with a consistent exposure. I know the sky is clipped and I don’t care about that.

I have upgraded to 4.6.1 and still my HDRs are pink. Any other ideas?

The less exposed photo you have is clipped in the highlights, you can activate the “highlight reconstruction” module of darktable in the HDR photo to get rid of the magenta clipped area.

I have tried with HDRMerge and it works:
IMG_0197-0199.dng (37.9 MB)
IMG_0197-0199
IMG_0197-0199.dng.xmp (15.5 KB)

1 Like

To me the hdr feature in darktable seems to merge the raw files without the right black level.
CR3 from R6 works. Perhaps CR3 works due to LibRaw?
From my 4.4.1, but 4.6.1 also generated purple colour cast for the CR2.

Edit: Actually my CR2 from 6D works. 6D uses decoder version 2 and 5D II uses decoder version 1. Only difference I find between them.

Raw files from my 6D CC0

20240507_MG_2373.CR2 (20.3 MB)
20240507_MG_2374.CR2 (19.3 MB)
20240507_MG_2375.CR2 (21.9 MB)

Here’s a theory: it looks like the crop position and size for the 5D Mark II are both odd (in the vertical direction), and this effectively shifts the CFA pattern and swaps the color channels (the HDR DNG is saved w/ the same pattern as the original CR2 before cropping, which is no longer matching). Indeed, in cameras.xml:

		<Crop x="158" y="51" width="5634" height="3753"/>

Can you try changing this to y="52" and height="3752"? (Will need to re-import the CR2s after this though, or reset the raw black/white point module for each…)

Edit: Yep, that was it:

2 Likes

First step is to install the lua scripts and activate HDRMerge
image
Second step is to select the three images in the lighttable and expand the HDRMerge module and click on merge.
image
Don’t use the create HDR option in the actions on selections module as it produces the horrible pink result.
image
I also agree that this shot doesn’t need a HDR merge treatment. But thanks for sharing the images as I hadn’t really explored the HDRMerge option much before this.

image

1 Like

Brilliant! This worked perfectly. Thanks very much for your help.

Thanks for taking the time to spell out how to do this, I wouldn’t have figured it out without your detailed instructions.

Thanks everyone who replied here. I know it might seem like a pointless photo, but there is a reason behind my madness, its part of a much larger photogrametry set, so I want to be able to deal with large exposure differences throughout the parts of the scene I care about (which is not the sky)