Plugin for darktable - available to test

Thank you Kevin! It works now. I have only two question:

  1. When I select two files RAW and DNG previously created, HDRMerge starts and never finish. Just progress bar stopped in the middle. Probably DNG files are not supported, but error message was not returned to DT.
  2. What is purpose of batch mode? What is gap in batch mode? Could you describe typical scenario when it can be applied?
    Thanks for your work

Glad it works now!

Just to make sure I understand your failure mode:

  1. Select RAW1 and RAW2, then run HDRMerge to create DNG_MERGED1
  2. Select RAW1 and RAW2 and DNG_MERGED1, then attempt to run HDRMerge again and it fails? (this failure causes the plugin status bar to hang and does not return as a failure)

Confirm I am understanding correctly and then I’ll make an issue for it on the GitHub page.

Regarding Batch mode:
You can select many, many sets of bracket exposures. HDRMerge will automatically group them based on their timestamps. Any pictures where there is a separation in time of at least the specified “gap” amount will be grouped into a new grouping. So,
Sequence1 [taken at 12:00:00]
twenty seconds later
Sequence2 [taken at 12:00:20]
You could select all images from sequence 1 and 2 at the same time, and HDRMerge would automatically split them as two separate sequences as long as “gap” is set to less than 20 seconds.

Take a look at the bottom of the page on HDRMerge’s user manual.

Hope that helps.

Do note that when running in batch mode the plugin does NOT auto-import the results like it does in single mode. You’ll need to go through dt’s normal import process to bring those in.

1 Like

Also, thanks for testing it out and reporting back, I appreciate it!

If any MacOS users can test it out that would be much appreciated. More work may be needed to get that working, I am not sure.

Thank you Kevin for explanation! Nice feature in batch mode. Good to know.

About failure, it is like that in fact:

  1. Select RAW1 and RAW2, then run HDRMerge to create DNG_MERGED1
  2. Select RAW and only DNG_MERGED1, then attempt to run HDRMerge again and it fails – and yes, “this failure causes the plugin status bar to hang and does not return as a failure”

More precisely for second step I selected one RAW and one DNG randomly, both was already in my folder, and run HDRMerge just for fool test to know if it it is possible to merge two arbitrary selected files.

Ahh, ok. I’ll do some testing around that to fix the error handling.

I do know it is possible to merge two shots of very different scenes, I did it and you get funky results. Probably it was not happy that there were two different file types. The documentation for HDRMerge does stipulate that the source images need to be taken with the same camera (so its probably expecting identical file type and pixel dimensions)

Have downloaded the plugin, however I’m unsure about what I need to add to the ~/.config/darktable/luarc file?

Thanks!

go to your lua directory (.config/darktable/lua) and make a downloads directory. Put the script in there and then edit the luarc file and add

require “downloads/hdrmerge”

1 Like

Thanks for that. However I’m not seeing the lua options as per BzKevin’s screenshot above. I’m running Darktable 2.4.4 on Mint 19 Mate

To get to the lua options, click the gear icon above the thumbnail view, which will give you the preferences, then select the lua options tab.

If you still don’t see it, start darktable from the command line with darktable -d lua, which provides debugging output for lua, and see if that provides any further information.

Thanks for that @wpferguson. Here is the output from running darktable with the debug mode:

darktable -d lua

3.231469 LUA ERROR : /home/brian/.config/darktable/lua/downloads/hdrmerge.lua:34: module ‘lib/dtutils.file’ not found:
no field package.preload[‘lib/dtutils.file’]
no file ‘/usr/local/share/lua/5.3/lib/dtutils/file.lua’
no file ‘/usr/local/share/lua/5.3/lib/dtutils/file/init.lua’
no file ‘/usr/local/lib/lua/5.3/lib/dtutils/file.lua’
no file ‘/usr/local/lib/lua/5.3/lib/dtutils/file/init.lua’
no file ‘/usr/share/lua/5.3/lib/dtutils/file.lua’
no file ‘/usr/share/lua/5.3/lib/dtutils/file/init.lua’
no file ‘./lib/dtutils/file.lua’
no file ‘./lib/dtutils/file/init.lua’
no file ‘/usr/share/darktable/lua/lib/dtutils/file.lua’
no file ‘/home/brian/.config/darktable/lua/lib/dtutils/file.lua’
no file ‘/usr/local/lib/lua/5.3/lib/dtutils/file.so’
no file ‘/usr/lib/x86_64-linux-gnu/lua/5.3/lib/dtutils/file.so’
no file ‘/usr/lib/lua/5.3/lib/dtutils/file.so’
no file ‘/usr/local/lib/lua/5.3/loadall.so’
no file ‘./lib/dtutils/file.so’
no file ‘/usr/local/lib/lua/5.3/lib/dtutils.so’
no file ‘/usr/lib/x86_64-linux-gnu/lua/5.3/lib/dtutils.so’
no file ‘/usr/lib/lua/5.3/lib/dtutils.so’
no file ‘/usr/local/lib/lua/5.3/loadall.so’
no file ‘./lib/dtutils.so’

Perhaps I need to install another library file?

you need the library files from https://github.com/darktable-org/lua-scripts. I’d recommend that you

cd ~/.config/darktable
mv lua lua.old
git clone https://github.com/darktable-org/lua-scripts.git lua
mv lua.old/downloads lua

That will install the complete lua repository with the libraries in the right place. Try it after that

Open file lua.tar.gz
Extract it to /home/arto/.config/darktable (your name instead of mine arto) .
With these settings in my computer works following lua-plugins: gimp.lua, hugin.lua, enfuse_pro_2.lua and HDRMerge.lua.

I also have Mint19 and Darktable 2.4.4

Lua options are here:
kuva

I hope that helps you !

Brian,

What @wpferguson said is correct, you need the rest of the Darktable lua-scripts installed as HDRMerge Script uses the utilities from them extensively.

Were you able to follow his instructions, or are you still having issues?

1 Like

Thanks for the replies @BzKevin, @yteaot and @wpferguson.

I now have the hdr merge plugin working. Although it seems to fall over when I’m using raw files which are in a folder which has a space in it’s name.

Yea, that is an issue with a lot of my plugins that I’m working with @wpferguson to resolve. New versions of most of my plugins will be coming out over the next few weeks hopefully.

2 Likes

I have uploaded a new version that aims to fix the issue with spaces in file paths. You can find it on github. Note that this version uses features found only in the newest lua master scripts, so be sure to get the latest.

HDRMerge Plugin

get latest lua scripts:

2 Likes

Thanks @BzKevin, for plugin. Since you’ve asked to try it on MacOS, so I did. On my Arch and Ubuntu Linux, works just fine.

Problem with Mac is that you cannot select proper binary location. Only thing I can select is HDRMerge.app, as it shown in screenshot:

But actual binary location is HDRMerge.app/Contents/MacOS/hdrmerge:

Sadly, it is not possible to drill to this location on Mac, only up to *.app level when using path location picker, the only way to drill to proper location is by selecting HDRMerge.app and right click Show Package Contents and only in Finder (same as Windows Explorer in Windows OS).

The way I circumvent this problem is by having an Applications folder (can be different name) in my home directory and then I created soft link from HDRMerge.app.

In any unix/linux this is easy task, by doing this command in your terminal:

ln -s /Applications/HDRMerge.app/Contents/MacOS/hdrmerge ~/Applications

This command will create a link to binary that is now selectable.
Note that copying hdmerge to some location would not work, since it needs some dynamic libraries packed into HDRMerge.app, so soft link to some location was best option for me:

Now there is a proper binary selectable to choose for HDRMerge: Binary Location:

I would assume that most Mac users would find it very difficult to set proper binary location, I’m more a Unix/Linux user so I have no problem with this “hack” and using terminal command.

After selecting proper binary location, everything worked as it should.

I’ve installed HDRMerge from the official download for Mac, not sure if there is any homebrew formula to install it, but I doubt it would help in this issue.

It would be best, if it would be possible either select location or just copy and paste location for HDRMerge: Binary Location, if not, anybody interested in making it work on Mac this is a way to make it working.

Hope it helps…

1 Like

Awesome, thanks for taking the time to not only test, but to find a work-around for this issue! If I have time to get back around to this plug-in for issue fixes I’ll look in to this. @wpferguson may be interested to hear this as well.

1 Like

@Tobias A pull request has been made to hopefully get this plug-in merged into the master lua scripts repo.

I have not had time to further look in to resolving the issue @x430n described. Once this gets merged in we can create an issue in github for it.

It’s actually quite easy to drill down to the binary locations…

In Finder, go to the relevant containing app.

  • Select “Show Contents”
  • Drill down until you get to the folder containing the binary. Now for the fun part…
  • Drag’n’drop the folder over to the “Favourites” area
  • Close Finder

Open darktable and do your stuff. Once you get to where you define the binary location and start the process, click on the folder that you had dropped earlier. You’ll then see the binary!