How could I perform median stacking images with Darktable? I search for the script for a simple straight solution for this.
Let’s say capture the beautiful night scene of the city on a phone and stack raw files to get excellent clean, noise-free images. I know Photoshop can do that, but I looking for open source solution running well under Linux.
DT wont do it … Likely GIMP will or you can use one or two LUA scripts that will invoke enfuse or hugin and likely there you can manage that. I don’t do it so I don’t have hands on experience…you may get a better answer but you can’t do it natively in DT.
GIMP is the answer if you want noise reduction. Simply open the images as a stack and for three images set the top two layers to 33% opacity and bottom layer to 100%. For five images set the opacity of top four layers to 20% and bottom layer to 100%.
I have personally given up on this technique as DT is so good at handling noise from even a single shot.
DT’s strength is not handling multiple images. Even PS will not do this with RAW files which is DT’s main focus. Respectfully, use the right tool for the job which is GIMP.
We told you it is available as a plugin (Lua script). We can help you get it installed (it can be done from within darktable, from the user insurance, no magic is involved).
I for one may take you up on this offer. I have not yet mastered lua scripts and have only used a couple of the built in scripts. What the OP wants to do I have done with GIMP, but it would be nice to do this in DT. I will make time to test it out and call out for help if needed. Lua scripts can be daunting to people who have grown up in a Windows world like me.
I also wish I could do nice exposure merging in DT. I still depend upon Adobe’s Lightroom for this. LR can align hand-held images and even remove people walking across the scene. That is one nice trick in LR. But at the end of 2023 Adobe will no longer provide a download link for my perpetual LR6 licence so I may lose that capability one day.
Get git for your OS (how: read the docs linked above)
Enable the script manager, and install scripts:
You’ll see many console windows popping up for a few moments, don’t be scared. Just wait until it’s over.
Make sure action = start/stop scripts is selected with category = contrib, and switch (arrow keys) to the page of the desired script:
Click the desired script, so it starts. You’ll see:
Select your images, then in the lighttable’s export module, select target storage = image stack, set the executables (you’ll have to get two tools, see darktable lua documentation - image_stack). You’ll need to set the paths to the executables only once.
I would recommend anyone with perpetual licences for Adobe products to download and safely store a version of the install files because after december 31 they may not be available. They won’t from Adobe and Adobe may prevent archival storage sites on the internet storing them if they really want to force everyone to pay a subscription. I only found this issue out about downloading because my Windows computer died and I had to download the Master Collection of Adobe programs and LR6. The Adobe online help was excellent and provided all the links I needed but confirmed download support would cease at the end of the year.
I don’t use Lua scripts very much, but the few I tend to use (EnfuseAdvanced and export scripts to Gimp and Hugin) always work as they should. Now I wanted to try the Image Stack script, but I run into a few problems. I have Imagemagick and Align_Image_Stack installed. When I export images with target storage “image stack”, I get an error message saying “ERROR: Convert executable not found”. A bit weird, as Imagemagick and Align_Image_stack should be the only dependencies, and I have those. I can’t find that I have anything called Convert, though.
Then I found this thread, and especially @kofa 's reply here:
In this screenshot, there is the section “select executable(s)”. As you can see below, I don’t have this:
Any ideas on how to solve this?
Darktable version is 4.2.1 from OBS, Linux Mint.
Yes, so it’s a bit strange that a normal installation of imagemagick does not include convert, but certainly not a darktable problem, so no point in complaining here😀
G’MIC has a median blending mode - I remember reading an article by Pat David on its use for noise reduction.
If blending in GIMP (using Normal mode), the percentage opacities should be set to: 100/n for the top layer, 100/n-1 for the second layer, 100/n-2 for the third layer, and so on. Where “n” is the number of layers. The bottom layer will obviously be at 100% opacity.