Image Stacking for Noise Reduction

The Create HDR feature in dt is great but I was wondering if it is possible to have a stack images function that could be used for noise reduction on high ISO images using a median blend. The output could be a DNG like in the HDR function. Kinda the same was as @patdavid did in his Imagemagick/G’MIC tutorial. This would be a nice function so as not to have to leave dt.

2 Likes

Have you considered a tool like HDRMerge that is tailored to creating these type of DNG files? Might be just what you’re looking for (if you hadn’t seen it already).

I know it’s not quite median averaging, but it does use the less noisy pixels when combining.

I’ll have a look at that. I suppose I was just wondering if it could be put into dt, like the HDR create function. The less round-tripping we have to do the better and more useful dt is to us.

It is technically possible, but someone must have the skill and time to code such things.

1 Like

unfortunate;y HDRmerge produced DNG is not compatible with DT. :frowning: there was a communication between the developers, but AFAIK the devs did not solve it yet.

UPD: oh, great, looks like it’s been solved now [Q] Option to choose DNG compression? · Issue #86 · jcelaya/hdrmerge · GitHub

I was hoping for stacking to be built in, seen as HDR creation is but HDG-Merge looks like it is the option. Does anyone know if there is a LUA script to export directly from dt to hdr-merge and then import the resultant image. Sorry but I have no coding abilities at all so have no idea of how to do this myself.

I don’t have the time to write such a script at the moment. But I’ll help you as much as I can.

There is an enfuse script to create HDR images, and we have a gimp and an hugin export script, that could be useful as a starting point:

I placed enfuse.lua into my lua directory and put requuire “enfuse” into the luarc file but when I start dt. I cannot find where to run the enfuse script. Lua is anabled as per darktable --version

Try running darktable -d lua and see if any errors are shown.

That being said, could we please come to the agreement that enfuse doesn’t produce HDR files? Thanks.

1 Like

Apologies, I got it sorted. I had the file location in the wrong place.

Looks like there is no hdrmerge for ubuntu 16.10 only 16.04 in the ppa. Gonna see if I can find a deb file I can install

That being said, could we please come to the agreement that enfuse doesn’t produce HDR files? Thanks.

It was someone called houz who committed on 2 Mar 2016 this lines:

This script uses enfuse to merge the selected images into one HDR and imports the result.
It only works on ldr images (like, JPEG).

Perhaps you should fix the description in the script. :wink:

Oooooh :scream:

1 Like

What a loser. My excuse being that I wrote the script for someone else and never used enfuse myself before, so I trusted the users input about what it’s good for in the first place. :smiley:

3 Likes

Spoken like a true developer :wink: how could you be wrong?!

Anyhow, does anyone think a lua script to do stacking (for noise reduction) with say hdrmerge or something is possible. I will look to see how hard it is to start learning lua if it’s possible.

If you can do it with HDRMerge it should be possible to write a dt Lua script.
This is how your ToDo list sould look like:

  1. Install HDRMerge.

  2. Test if it is possible with HDRMerge.

  3. Try do do it via the commandline:
    HDRMerge User Manual v0.4.5

  4. Write the Lua script.

  5. Push the Lua script to the githup repository.

Lua is definitely a nice language to learn. I’ve read a hardcopy of Programming in Lua (for evaluation for a project that wasn’t realized) and there are some eye-opening “tricks” in it even for an experienced programmer coming from non-functional languages. Certainly worth a read.

There is a new and better enfuse script proposed on the dev mailing list, maybe worth a look: [darktable-dev] Darktable 2.2.X Plugin Enfuse Professional

1 Like

That looks cool. I keep get a compression exception error though. It did work once with 8-bit uncompressed (non-gpu remapped) format. I will put up a error report.