I’m looking forward to your solution, Kevin. I appreciate that unlike the original, your version dumps the resultant image and sidecar back into the working directory.
Yes, I was an avid user of the original plug-in when i was running linux. When I had to switch to Windows and found the script incompatible I took the opportunity to add certain usability features I had wished for a long time. I hope others find them useful additions as well.
I will keep you posted on any progress I make, however, just a warning, it may take a while for me to get around to it, I’ve been rather busy lately. But now that I know someone is out there waiting for it I will see what I can do.
That should stop you to push it to the master Lua set. Most of the scripts there are not tested on MacOS or even Windows, because we simply have no developer the with MacOS and no developer who uses Windows as main OS. Every help is welcome.
Alright, Well I think I see the issue that Hevii is having on MacOS. Once I finish troubleshooting with him I’ll request it be added to the master set. I’ve got an HDRMerge plug-in I’ll request added at the same time.
I made some small changes to the script to fix MacOS compatability. Have confirmed it now works on my wife’s mac. I will upload the file to GitHub shortly.
Kevin is a wizard. I can confirm that the script now works
I’m looking forward to seeing his other improved scripts!
Thank-you, Kevin, and everybody else who works so hard on darktable and its various “plug-ins”.
Hello everyone,
I’m quite new to DT and yet am already tinkering with your script Kevin . I have rebooted after I’ve specified the 3 paths in the LUA options. I am for now on windows, but I’ll probably be working potentially on all 3 platforms, Linux, Windows and Mac. Let’s focus on windows for now and take one step after the other.
It almost works and then crashes when enfuse needs to blend / write the blended tif into the specified directory.
Here’s what I’ve got in the log :
10.026882 LUA enfuse_pro_2 - Executable Path Preference: C:\Program Files\Hugin\bin\align_image_stack.exe 10.115881 LUA enfuse_pro_2 - Executable Path Preference: C:\Program Files\Hugin\bin\enfuse.exe 10.207886 LUA enfuse_pro_2 - Executable Path Preference: C:\Program Files\Hugin\bin\exiftool.exe 45.641511 LUA Starting Image Fusion 45.642462 LUA Align Start Command: "C:\Program Files\Hugin\bin\align_image_stack.exe" -i -C --distortion -g 5 -c 8 -t 3 --corr=0.9 -a C:\Users\Seb\AppData\Local\Temp\aligned_ C:\Users\Seb\AppData\Local\Temp\IMG_0731.tif C:\Users\Seb\AppData\Local\Temp\IMG_0731_01.tif C:\Users\Seb\AppData\Local\Temp\IMG_0731_02.tif 58.997313 LUA Completed Align 59.373299 LUA Blend Start Command: "C:\Program Files\Hugin\bin\enfuse.exe" --exposure-weight=1.0 --saturation-weight=0.0 --contrast-weight=0.0 --exposure-optimum=0.5 --exposure-width=0.20000000298023 --contrast-window-size=5 --contrast-edge-scale=0.0 --contrast-min-curvature=0.0% --depth=16 --compression=LZW --output=C:\Users\Seb\Pictures\test DT Enfuse\IMG_0731_01-0731.tif C:\Users\Seb\AppData\Local\Temp\aligned_0000.tif C:\Users\Seb\AppData\Local\Temp\aligned_0001.tif C:\Users\Seb\AppData\Local\Temp\aligned_0002.tif 59.803296 LUA Completed Blend 59.804296 LUA ERROR Enfuse failed 59.804296 LUA Deleting temp files... 60.015294 LUA Done deleting
I’m sure I’m missing something simple…
Thanks ahead of time for your support
Cheers
I think this is due to there being spaces in your file path. I have an updated version that fixes this limitation which will likely be released in the next few days.
Ok. I’ve thought about that too but then how to explain that align_image_stack seems to be working ? The path being the same and quoted in the start command ?
Anyhow I can wait out a few days no worries
Thanks for the quick reply ! Much appreciated.
I’m happy (relieved) to read that you’re working on another update to this great script, Kevin. Are you doing this because, like me, you’ve found that the previous version doesn’t work if it’s called from Bill Ferguson’s likewise-great script “Darktable Lua Script Manager” - it’s still ‘great’ in spite of the misspelling of darktable
The problem that I’m facing is that “Enabling” your script from Bill’s doesn’t do a thing.
Here’s the debug output:
25.942936 LUA activating enfuse_pro_2-1
25.943260 LUA ERROR : /Users/heviiguy/.config/darktable/luarc:82: attempt to concatenate a nil value (local 'script')
stack traceback:
[C]: in metamethod '__concat'
/Users/heviiguy/.config/darktable/luarc:82: in upvalue 'prequire'
/Users/heviiguy/.config/darktable/luarc:258: in upvalue 'activate'
/Users/heviiguy/.config/darktable/luarc:298: in function </Users/heviiguy/.config/darktable/luarc:286>
[C]: in ?
I’m wondering if the problem may have something to do with the fact that I’ve moved your script from the “Contrib” directory to one that I’ve created as “Special”. Other scripts in the latter directory can be enabled without issue.
It’s the dash in the filename that’s causing the problem. It’s a “magic” character in string matching, so script_manager is choking on it. It’s fixed in the latest version of script_manager.
Bill
Thanks, Bill.
I finally got around to pulling my git . Twice
I ran into a problem in that the symlink to my “Special” directory had disappeared after one of the pulls. This meant that I was only able to load from the default ‘contrib’ and ‘official’ directories. Since enfuse_pro is located in my Special directory, I wasn’t able to enable it. However, as soon as I did a …
ln -s /Users/heviiguy/Programs/MacOS/darktable_lua/Special/ / /Users/heviiguy/.config/darktable/lua/Special/
…
everything behaved as expected. I’ll now note to do this after every new pull.
Your lua magic and your support thereof is appreciated!!
You’re welcome.
I have a color chart on the way, so I’ll see what I can do with the challenge
This has got me excited! My breath will be bated while I await your script to help produce camera profiles.
Perhaps the process might be helped by referring to somebody who has already jumped through the proverbial hoops. Whereas there are quite a few articles on this subject, I’ve found that for the most part, many are incomplete, misinformed, and some even downright misleading. At the other end, certain articles drown the layperson in a flood of technical jargon which tends to obfuscate the simple goal. There are, however, some which hit the Goldilocks spot. One of the latter which I’ve just come across in my “proper camera profiling quest” is Thomas Sobek’s contribution. In my limited knowledge of the topic, he seems to hit the right spots. Besides, anybody who bases his procedure with Elle Stone’s input has already garnered copious credibility by association
The article: https://tomassobekphotography.co.nz/articles/create-camera-input-profile-with-ColorChecker-Passport.php
I have made some updates to this script to improve its cross-platform compatability and to resolve an issue it had when there were spaces in the filepath. I am also working with the darktable team to get this included in the main lua scripts repository (as such the name has changed from enfuse_pro_2 to enfuseAdvanced). Until then you can find it on my github page. This latest version of the script requires you to have the latest versions of the official lua scripts so be sure to update those as well.
Due to changes made on the back-end side of the code when this is installed any DRI/DFF presets you have saved will be restored to default, so you may want to take note of your settings prior to install if you use that functionality of the plug-in.
updated script
get the latest lua scripts here
I’m sorry, but your script doesn’t work …
LUA ERROR : error loading module 'contrib/enfuseAdvanced' from file '/home/asn/.config/darktable/lua/contrib/enfuseAdvanced.lua':
/home/asn/.config/darktable/lua/contrib/enfuseAdvanced.lua:133: invalid escape sequence near '"enfuseAdvanced - (Re)Initializing preferences due to script load\c'
Shoot, uploaded the wronger version. New one up in a minute. My bad.
EDIT: “Invalid escape” should be resolved now
Some comments about the code:
- The script mixes tabs and spaces. You should settle on one and use that.
- Also there are a lot of trailing spaces
- I would add support for exiv2 as darktable uses libexiv2. So it is likely that this is already installed.
I happily confirm that enfuseAdvanced is functional on MacOS 10.13.6 (High Sierra).
Thanks for this, Kevin!
Hi Hevii_Guy et al,
I’m back with some more (dummy) questions as I’m now running DT on an iMac 5k. I managed to have this Lua script working on windows but on the iMac it’s quite different.
It currently exports no worries and then I get “ERROR: enfuse didn’t work. For more information see terminal output”.
I’m trying to do so as I start DT using “open -a darktable --args -d Lua” or even “all” at the end, but nothing gets printed in the terminal. Again probably a noob thing, my apologies for that, and thanks ahead of time for the support, and this great script
Could you please let me know which path you indicated for the different tools to be used ?
I have installed exiftool in usr/local/bin
I have found Enfuse in /Applications/Hugin/PTBatcherGUI.app/Contents/MacOS/enfuse
I have found Align_image_stack in /Applications/Hugin/Hugin.app/Contents/MacOS/align_image_stack
Keep up the good work!