Project

General

Profile

Feature #10872

Implementation of enfuse

Added by Joe Giampaoli over 4 years ago. Updated over 3 years ago.

Status:
Fixed
Priority:
Low
Assignee:
-
Category:
General
Target version:
Start date:
01/15/2016
Due date:
% Done:

100%

Estimated time:
Affected Version:
git development version
System:
Debian
bitness:
64-bit
hardware architecture:
amd64/x86

Description

It would be great if enfuse would be implemented as an alternative to the HDR function which is also great. Unfortunately, HDR merging can sometimes create weird artifacts, halos or strange ghosting where enfuse seems to blend in a more of an "average" style without creating these type of artifacts. Also the results can be sometimes superior to those of HDR merging. I understand that enfuse can be quite time consuming to run, especially if enfusing many shots. The advantage of enfuse is that even normal 8 bit (jpeg) images can be processed and then outputted to 16 or even 32 bit tiffs or EXRs with loads of headroom to edit. I sometimes like to do long exposure simulations with over 50 shots with enfuse and the results are quite great. Just wanted to know if it could be implemented sometime in DT to make workflow easier...

Thanks!

enfuse.lua (3.98 KB) enfuse.lua Tobias Ellinghaus, 01/15/2016 07:29 PM

History

#1 Updated by Tobias Ellinghaus over 4 years ago

As long as you just want to run enfuse on your images and import the result it should be quite easy to do that with a Lua script. Would you need any settings/control about what parameters get passed to enfuse? Or are defaults enough?

#2 Updated by Joe Giampaoli over 4 years ago

Thanks for your help!

Well I usually do in terminal in the directory where I have my shots (let's suppose they are JPG's):

enfuse -d n -o /my/output/file.tiff *.JPG

where n is either 16 or 32 bit depth

In rare cases I use the option:

--exposure-mu=100

for maybe startrails (I know starstax is much better with lighten mode)

How would I do that with Lua? I should start experimenting with Lua since CHDK also uses it...

Thanks again!

#3 Updated by Tobias Ellinghaus over 4 years ago

  • % Done changed from 0 to 50
  • Status changed from New to In Progress
  • File enfuse.lua enfuse.lua added

Please test the attached script. It's not perfect yet but might be a good start for further refinements. If it works okay we will probably add it to our Lua script repo.

#4 Updated by Joe Giampaoli over 4 years ago

Thank you so much Tobias! Yes, I'll give it a test run later with time and get my feet wet with lua scripting and see what I can adjust to my needs.

I really appreciate your help!

Cheers!

#5 Updated by Joe Giampaoli over 4 years ago

Just to let you know I finally had the opportunity to play a bit with the script. Works like a charm! I'll see if further edits or tweaks are needed but just being able to select the bit-depth and exposure-mu and being able to select which images to enfuse "visually" is a big plus!

Really appreciate it (again)

#6 Updated by Tobias Jakobs over 4 years ago

I looked at the script and to improve the temp file handling

-- create a temp response file
-- TODO: make filename unique
local response_file = dt.configuration.tmp_dir.."/enfuse_files.txt"
...

you may be interested in io.tmpfile () or os.tmpname ().
http://www.lua.org/manual/5.1/manual.html#pdf-io.tmpfile
http://www.lua.org/manual/5.1/manual.html#pdf-os.tmpname

And to check if enblend is installed you may be interested in the checkIfBinExists() funktion I wrote in the hugin.lua script:
https://github.com/darktable-org/lua-scripts/blob/master/contrib/hugin.lua

#7 Updated by Tobias Ellinghaus over 4 years ago

  • % Done changed from 50 to 100
  • Status changed from In Progress to Fixed

Thanks for the pointers, I did some small changes and pushed the result to our script repo. One big TODO is that it still has the output filename "enfuse.tiff" hardcoded. Using tmpname() wouldn't work there. If anyone has a good idea we can fix that together.

#8 Updated by Joe Giampaoli about 4 years ago

I just noticed that enfuse is no longer showing up in the main lighttable pane...

Using DT stable 2.0.3 and still have the enfuse.lua file in my darktable config folder

Thanks!

#9 Updated by Joe Giampaoli about 4 years ago

Sorry! My mistake, now it's all the way to the bottom, it was located a bit higher before...

#10 Updated by Tobias Ellinghaus about 4 years ago

Yes, there are still some bugs wrt. these Lua modules.

#11 Updated by Roman Lebedev over 3 years ago

  • Target version set to 2.2.0

Also available in: Atom PDF

Go to top