Image stack file location

Just started using script manager so I could load the focus stacking function under “export selected”. I cannot see where the focus stacked file is saved, so after the process finishes, I have no idea where to look for the new file.

Stopped using this plugin rather long ago, but I do seem to remember that the output was created in /tmp

That is assuming you, like me, use Linux. Would not have a clue what the Windows equivalent would be.

Win 10 user, thanks for the input.

Quick search gave me this: How to […] Temporary Files in Windows 10, which might be worth checking out.

Thanks, I just looked, no joy.

I am on Windows 10 and in my case the stacked image is saved alongside the input images and imported in Dt collection

I have searched, chose save as tif, then searched drive for all tif, no joy. Very frustrating as it looks like a cool function.

From image_stack.lua documentation

ADDITIONAL SOFTWARE NEEDED FOR THIS SCRIPT
    * align_image_stack - http://www.hugin.org
    * imagemagick - http://www.imagemagick.org

Are you sure you installed those prerequisites and configured their path in the module GUI under “select executable(s)”?
You can’t configure where the stacked image is saved because it is supposed to be saved alongside your input images and imported in the roll.
If the stacked image is not imported, it’s because something went wrong in the process and there is no output image.
I suggest you run a lua debugging session as follows:

  • go to C:\Users\<your-name>\AppData\Local\Microsoft\Windows\INetCache\darktable (be aware that INetCache folder might be invisible, but it’s there)
  • if there is a file darktable-log.txt, delete it
  • then open a command prompt in Windows in folder C:\Program Files\darktable\bin
  • run the command darktable -d lua
  • try to export a stacked image
  • a new darktable-log.txt file will be written in the first folder
  • open the file and report its content here

darktable can do focus stacking?

yes, with the script enfuseAdvanced.lua.
I have not used it recently, see the documentation in the file

Thank you, here is the log file
version: darktable 3.4.1.1
start: 2021:02:26 08:30:18

[dt_pthread_create] info: bumping pthread’s stacksize from 0 to 2097152
[dt_pthread_create] info: bumping pthread’s stacksize from 0 to 2097152
[dt_pthread_create] info: bumping pthread’s stacksize from 0 to 2097152
[dt_pthread_create] info: bumping pthread’s stacksize from 0 to 2097152
[dt_pthread_create] info: bumping pthread’s stacksize from 0 to 2097152
[dt_pthread_create] info: bumping pthread’s stacksize from 0 to 2097152
176.918350 LUA “C:\Program Files\Hugin\bin\align_image_stack.exe” -m -i -C --distortion -g 6 -c 8 -t 4 --corr=0.5 --gpu -a C:\Users\Fzyace\AppData\Local\Temp/aligned_ “C:\Users\Fzyace\AppData\Local\Temp_GRI3959.tif” “C:\Users\Fzyace\AppData\Local\Temp_GRI3964.tif”
176.931614 LUA opened file

C:\Program Files\darktable\bin>“C:\Program Files\Hugin\bin\align_image_stack.exe” -m -i -C --distortion -g 6 -c 8 -t 4 --corr=0.5 --gpu -a C:\Users\Fzyace\AppData\Local\Temp/aligned_ “C:\Users\Fzyace\AppData\Local\Temp_GRI3959.tif” “C:\Users\Fzyace\AppData\Local\Temp_GRI3964.tif”
252.432939 LUA result from windows command was 0
253.466872 LUA image list is “C:\Users\Fzyace\AppData\Local\Temp_GRI3959.tif” “C:\Users\Fzyace\AppData\Local\Temp_GRI3964.tif”
253.943842 LUA convert command is “C:\Windows\System32\convert.exe” -quiet -define tiff:ignore-tags=40965,42032,42033,42034,42036,18246,18249,36867,34864,34866 “C:\Users\Fzyace\AppData\Local\Temp\aligned_0000.tif” “C:\Users\Fzyace\AppData\Local\Temp\aligned_0001.tif” -evaluate-sequence Median “C:\Users\Fzyace\AppData\Local\Temp_GRI3959-_GRI3964.tif”
253.957842 LUA opened file

C:\Program Files\darktable\bin>“C:\Windows\System32\convert.exe” -quiet -define tiff:ignore-tags=40965,42032,42033,42034,42036,18246,18249,36867,34864,34866 “C:\Users\Fzyace\AppData\Local\Temp\aligned_0000.tif” “C:\Users\Fzyace\AppData\Local\Temp\aligned_0001.tif” -evaluate-sequence Median “C:\Users\Fzyace\AppData\Local\Temp_GRI3959-_GRI3964.tif”
254.567802 LUA result from windows command was 4
254.569800 LUA image list is “C:\Users\Fzyace\AppData\Local\Temp\aligned_0000.tif” “C:\Users\Fzyace\AppData\Local\Temp\aligned_0001.tif”

I have checked and Imagemagick and hugin are installed, I have not inserted them into the “select executables”. I’m not sure which of the several programs installed with Hugin or Imagemagick belong in those lines.

The align_image_stack executable seems to be correct, but C:\Windows\System32\convert.exe is wrong.
You should locate convert.exe in C:\Program Files\ImageMagick-7.0.9-Q16 or similar, depending on the version installed

The convert command didn’t run or didn’t run properly. If it ran correctly, then the result would have been 0.

The next line where it lists the aligned images is the cleanup function to remove the generated images.

@MarcoNex is correct. ImageMagick must be installed and the convert command used is from that. The convert command used above was a windows utility to convert filesystems from FAT to NTFS. Once you install ImageMagick, or if you already have it installed, start tools/executable_manager and use it to select the correct convert executable.

latest Log file, still no joy.

version: darktable 3.4.1.1
start: 2021:02:27 15:55:35

[rawspeed] (enfuse-20210227133517.tif) virtual std::unique_ptrrawspeed::RawDecoder rawspeed::RawParser::getDecoder(const rawspeed::CameraMetaData*), line 46: File too small

C:\Program Files\darktable>“C:\Program Files\Hugin\bin\align_image_stack.exe” -m -i -C --distortion -g 5 -c 9 -t 3 --corr=0.9 --gpu -a C:\Users\Fzyace\AppData\Local\Temp/aligned_ “C:\Users\Fzyace\AppData\Local\Temp_GRI3909.tif” “C:\Users\Fzyace\AppData\Local\Temp_GRI3910.tif”

C:\Program Files\darktable>“C:\Program Files\ImageMagick-7.0.11-Q16-HDRI\convert.exe” -quiet -define tiff:ignore-tags=40965,42032,42033,42034,42036,18246,18249,36867,34864,34866 “C:\Users\Fzyace\AppData\Local\Temp\aligned_0000.tif” “C:\Users\Fzyace\AppData\Local\Temp\aligned_0001.tif” -evaluate-sequence Median “C:\Users\Fzyace\AppData\Local\Temp_GRI3909-_GRI3910.tif”

C:\Program Files\darktable>“C:\Program Files\Hugin\bin\align_image_stack.exe” -m -i -C --distortion -g 5 -c 9 -t 3 --corr=0.9 --gpu -a C:\Users\Fzyace\AppData\Local\Temp/aligned_ “C:\Users\Fzyace\AppData\Local\Temp_GRI3909.tif” “C:\Users\Fzyace\AppData\Local\Temp_GRI3910.tif”

Could you run darktable with the -d lua switch? That way I can see what the script is actually doing. Thanks

Look like alignment is a problem
version: darktable 3.4.1.1
start: 2021:02:28 08:39:29

[dt_pthread_create] info: bumping pthread’s stacksize from 0 to 2097152
[dt_pthread_create] info: bumping pthread’s stacksize from 0 to 2097152
[dt_pthread_create] info: bumping pthread’s stacksize from 0 to 2097152
[dt_pthread_create] info: bumping pthread’s stacksize from 0 to 2097152
[dt_pthread_create] info: bumping pthread’s stacksize from 0 to 2097152
[dt_pthread_create] info: bumping pthread’s stacksize from 0 to 2097152
33.311723 LUA found enfuse executable at “C:\Program Files\Hugin\bin\enfuse.exe”
34.510652 LUA enfuse version is 4.3
180.075910 LUA “C:\Program Files\Hugin\bin\align_image_stack.exe” -m -i -C --distortion -g 5 -c 9 -t 3 --corr=0.9 --gpu -a C:\Users\Fzyace\AppData\Local\Temp/aligned_ “C:\Users\Fzyace\AppData\Local\Temp_GRI3959.tif” “C:\Users\Fzyace\AppData\Local\Temp_GRI3964.tif”
180.086910 LUA opened file

C:\Program Files\darktable\bin>“C:\Program Files\Hugin\bin\align_image_stack.exe” -m -i -C --distortion -g 5 -c 9 -t 3 --corr=0.9 --gpu -a C:\Users\Fzyace\AppData\Local\Temp/aligned_ “C:\Users\Fzyace\AppData\Local\Temp_GRI3959.tif” “C:\Users\Fzyace\AppData\Local\Temp_GRI3964.tif”
200.130086 LUA result from windows command was 1
200.133084 LUA ERROR image alignment failed
200.135084 LUA image list is “C:\Users\Fzyace\AppData\Local\Temp_GRI3959.tif” “C:\Users\Fzyace\AppData\Local\Temp_GRI3964.tif”

You can try exporting the two images to tifs, then running the command by hand against them to see whtat the problem is. I’ve had some images that just won’t align, for whatever reason.

I have pretty much decided that focus stacking through Darktable may be more trouble than it is worth. Up until this afternoon I had the handy feature “executable manager”, it has vanished. The results from enfuse are not so good. I’ve gone back to Picolay for image stacking; works, aligns, free.

Regards,

Well, not really.
What you normally want to do is:

  • make a basic editing of the raw files: exposure, filmic, lens correction, color calibration, having care to leave some room for further editing
  • do the stacking; it is crucial that the stacked image is at least a 16 bit/channel tiff file
  • reimport the stacked image in DT for the final editing
    Of course you can do all that by hand, but the image_stack lua plugin automates all that quite nicely, without leftovers, and it works fine with default parameters.

For example see this full-res picture of Notre Dame in Paris (before the fire :frowning:), made by stacking 21 raw files from a Sony A6000 APS-C camera, hand-held at ISO 3200. It looks quite clean to me and it took a couple of minutes to do.

You got a “alignment failed” error. One good reason could be that lens correction is not applied equally to all images, worth checking. Consider that by default DT doesn’t copy/paste lens correction, you have to explicitely set that by using selective copy/paste.

Finally, Picolay is a nice utility, however from its manual:

TIF images (*.tiff or *.tif) can be opened, but will be changed to 24 bit 
bitmaps
internally. PICOLAY cannot save tif files.

So 16 bit tiffs are converted to 8 bit jpegs, which is insufficient for further serious editing.
Moreover, it doesn’t support all RAW formats, Sony ARW for example is not supported.

1 Like