For the last several months real life has conspired to severely limit my coding time. The works in progress are eventually destined for the official repository, but they aren’t finished yet. But, they do work (at least for me) and have the core functionality to make them useful.
All of the scripts depend on the darktable lua-scripts libraries. The best way to install the extra scripts is in a subdirectory under the lua scripts directory. Instructions are at https://github.com/wpferguson/extra-dt-lua-scripts/README.md.
Currently the repository has the following scripts:
export2collection - I got the idea from watching Harry Durgin’s videos and wrote a script to save some steps and time.
dxo_photolab - Send an image out to dxo photolab for editing and return the result.
adjust_time - Synchonize image timestamps when 2 cameras are used to one event
correct_lens - Modify the detected lens information so your lens shows up as 100-400mm F5-6.3 DG OS HSM | Contemporary 017 instead of (638).
postsharpen - sharpen images after export using Imagemagick’s sharpen or unsharp-mask sharpeners.
I have several more works in progress, mostly targeted at the development version of darktable. I’ll add enough comments so that people can figure out how to use them and then add them here.
Thanks @wpferguson! Post sharpen looks awesome. Might have to modify it to work with gmic’s RL deconvolution or octave sharpening, both of which work really nicely.
@paperdigits I thought about using gmic, but I understood Imagemagick better. I think including other sharpening engines is a good idea. I could probably make the sharpening engines a little more modular so that adding an extra is obvious and no big deal. Perhaps we could even do multi stage sharpening using different engines.
@paperdigits, I pushed a new version of postsharpen.lua. I added presets and made the engine definitions modular. I also added gmic and a definition for R/L deconvolve. I also added MacOS and Windows compatibility.
The way to fix this error is open your darktablerc file and delete any line that starts with
lua/postsharpen/...
Save the file and try again. The cause is that I save the settings in one long string and split it apart. I’m guessing you had an older version and updated to the new version. When that happened the old settings string was still there and got picked up when you loaded the script and caused the invalid index. You could try changing the line
lua/postsharpen/initialized=TRUE
to
lua/postsharpen/initialized=FALSE
which should cause the script to regenerate all it’s settings.
Hi Bill,
I just found these and understand it’s a WIP and I appreciate your work. I’m still learning about the different methods used by your post sharpen but when running the RL Deconvolce it hangs or I get the following:
667.997163 LUA image format is jpg
668.011689 LUA found 3 engines
668.011732 LUA processing sharpen_radius
668.011820 LUA processing sharpen_sigma
668.011887 LUA processing unsharp_mask_threshold
668.011923 LUA processing unsharp_mask_sigma
668.011958 LUA processing unsharp_mask_radius
668.012018 LUA processing unsharp_mask_amount
668.012062 LUA processing richardson_lucy_deconvolve_cut
668.012098 LUA processing richardson_lucy_deconvolve_sigma
668.012131 LUA processing richardson_lucy_deconvolve_blur
668.012164 LUA processing richardson_lucy_deconvolve_iterations
670.011025 LUA exporting 20191123_0008.NEF to /tmp/20191123_0008_01.jpg
670.016932 LUA took the adjustment
670.016968 LUA in sub1...
670.017067 LUA sharpen_opts are 1.00,10,1,1
670.020960 LUA exported image filename is /tmp/20191123_0008_01.jpg
670.034690 LUA ERROR : /home/dave/.config/darktable/lua/wpferguson/postsharpen.lua:457: attempt to concatenate a boolean value (local 'prog')
stack traceback:
[C]: in metamethod '__concat'
/home/dave/.config/darktable/lua/wpferguson/postsharpen.lua:457: in function </home/dave/.config/darktable/lua/wpferguson/postsharpen.lua:405>
875.525054 LUA ERROR : attempt to call a nil value
stack traceback:
[C]: in ?
[C]: in ?
I’m running darktable 3.0 under Ubuntu 19.10.
If none of this is useful to you then ignore it.
Thanks again,
Dave
Do you have gmic installed? If not, that would result in prog being false (which I should have checked for). I should probably rethink the initialization and not give you the option to use certain methods if the executable isn’t available. I guess this means that I should also check for the applicable gmic scripts before I offer them.
In the meantime the workaround would be to ensure gmic is installed and in the path and the gmic scripts are up to date.
If gmic is installed and in the path, then start tools/executable_manager and clear the executable path for gmic.
Ha ha! Turns out I did not. Working fine now. New Mint install for the new year.
Here’s what I got trying to run import2collection (appears as “file to collection” in target storage):
889.716756 LUA ERROR moving /tmp/20200102-ames_estate_fence-60.tif to /home/dave/darktable/photos/2020/2020-01/01-02-ames_estate_fence/20200102-ames_estate_fence-60.tif
889.716949 LUA ERROR : ./wpferguson/export2collection.lua:142: attempt to call a nil value (global 'checkIfBinExists')
stack traceback:
[C]: in global 'checkIfBinExists'
./wpferguson/export2collection.lua:142: in upvalue 'file_move'
./wpferguson/export2collection.lua:169: in function <./wpferguson/export2collection.lua:149>
I pulled that one out, dusted it off, and put it in the collection. It appears that it was a little dustier than I thought. Give me a day or two and I’ll just rewrite it and get rid of all the cruft.