-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better HDR merge with auto-allignment #17326
Comments
darktable is a raw processor, not an HDR tool HDRmerge, enfuse, etc. are HDR tools. Lua scripting is built into darktable to allow extended functionality for things that darktable doesn't, can't, wont, provide natively.
Did you try raising an issue or asking on forums? |
@wpferguson we might want to discuss "remove the dt HDR merge code" as of too-low quality? |
IIRC I tried the HDR in darktable 3 cameras ago (~8 years). I created the HDR from 3 images, but then you had to apply the global tonemap module to get something usable. I never had much luck using it. Houz had written the official/enfuse.lua script by then and I used that and got good results. Since global tonemap is deprecated I'm not sure there is a way to get a usable HDR from the darktable HDR merge. |
HDRmerge and enfuseAdvanced align the images. enfuse doesn't, but it could be added to the script with a couple of lines of code. darktable does not align the images. |
HDRMerge can take raw files, so no export required and produces a DNG file. So essentially it is the same as darktable HDR but with image auto align. So this means that we could "replace" the |
I'll play... |
I played 😄 Here's a handheld HDR bracket merged with the current darktable Create HDR And here's the same bracket with HDRMerge triggered from a script You can see the misalignment in his head and especially in the fence, which is fixed with HDRMerge. The script works, but it needs a couple of changes to provide more feedback to the user. So what do we need to do to make this a replacement for the current Create HDR? We need HDRMerge Do we....
The lua-scripts need to be part of the darktable package
EDIT: We also have to think about package formats, i.e. appimage, flatpak, snap, ??? Packaging the scripts and HDRMerge would solve this. |
I would like to second @gluckgluckwasserbauch’s enhancement request. I also use HDR merge a lot, but with a slightly different goal: I have started editing some of my photos for high dynamic range displays (think Rec. 2100), exporting them to HDR formats like JPEG XL, AVIF, UltraHDR JPEG, etc. For HDR edits, it is critical to preserve the highlights, while still having decently clean shadows. But, sometimes, even the dynamic range of a modern full-frame camera isn’t sufficient for this, and I will use the burst mode to perform some basic handheld bracketing (often just an extra -3EV exposure) to recover some dynamic range. This pixls.us post contains an image produced this way. Having the HDR merge feature directly accessible in Darktable is very convenient, since it produces in one click a DNG file that can be edited just like any other raw file, but with increased dynamic range. However, while I sometimes obtain good results if my hands remain steady and the IBIS does a good job (or I brought my tripod), most of the time the shots will be shifted/rotated by a few pixels, leading to a low "keepers" rate. I can usually recover the shots by aligning them with Hugin while preserving the full dynamic range. To do so, I use EXR as input and output format, and I disable any exposure blending/compensation and tone mapping. This also requires applying all corrective modules before merging, and manually managing the colour spaces (I do everything in linear Rec. 2020), since EXR doesn’t store this data. So, while certainly doable, the process is quite cumbersome. I have also tried the Lua script, but this didn’t work at all for me, producing completely wrong colours. All that to say that having a working HDR merge button with auto-alignment within Darktable could be very useful, regardless of whether it is implemented in Darktable itself or outsourced to a Lua plugin (just not the current one, which seems broken). For me, the most important part is to have the option to disable any tone mapping and get a scene-referred, (perceptually) lossless, "raw-like" output, like a demosaiced DNG or another high-bit-depth file. Just my two cents. EDIT: I now remember the issue with HDRmerge. The stable release is massively outdated (2015) and produces incorrect colors, while newer development versions are only available for Linux (but not Windows or macOS). So using it instead of the current "Create HDR" would amount to dropping support for this feature on two platforms. |
Is your feature request related to a problem? Please describe.
I like to shoot HDR images. For that, I use exposure bracketing and shoot 3 images at once.
One underexposed, one optimally, and one overexposed.
Then I stack them onto each other to create an HDR image.
I didn't use Adobe Lightroom yet, but from what I've heard, it does that way better than Darktable.
The main reason: it auto-alligns the images to fit perfectly onto each other.
With DT, if I don't shoot with a tripod, they don't get stacked onto each other, which causes a very janky picture, even with super fast shutter speeds and a steady hand (see below).
There are a few LUA scripts that do that, but I couldn't get them to work.
(And, tbh, having to resort to janky scripts for a basic feature like that shouldn't be standard imo).
Also, the colors are quite a bit off and the whole image looks very artificial, even if it would be stacked correctly.
Describe the solution you'd like
My idea would be to add a dialog window after clicking the "create HDR picture" button.
In the dialog, you can generate a preview and have some toggles, like 'Auto-allign if possible', 'Set transparency' for every frame, and maybe some more.
It should also be possible to safe those preferences and apply them automatically.
This feature could be relatively easy to implement. It is basically just a GUI-frontend for some already existing scripts, like Hugin, ImageMagick, Enfuse, and maybe some more.
Alternatives
Additional context
How it should look like: (kind of)
How it actually looks like in DT:
The text was updated successfully, but these errors were encountered: