Image stack file location

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

That is a beautiful and impressive image!
I get frustrated when I cannot even stack two simple images.
I thought DT pulled lens data from the exif file, I don’t know what " Consider that by default DT doesn’t copy/paste lens correction, you have to explicitely set that by using selective copy/paste." means.

My effort:
Select two nef images in lighttable. (no editing, just a test)

Select “export selected”, “target storage”, “image stack”
Select tif in “file format”

Select “export”
The left panel progress indicates “exporting 1/2 to image stack, then 2/2 to image stack”
After about 3 minutes the progress indicator goes away, but there is no new image in the thumbnails or in the collection list, nothing to import.
I read through the log file and looked in the “C:\Users\Fzyace\AppData\Local\Temp\aligned_0000.tif” location and found the stacked image named from the two source files. Is this how it is supposed to work?

I appreciate your help and patience with my efforts to make this work for me. I’m sure it is simple for you, not for me.

If you can edit the file then replace this line

  local align_image_stack_command = align_image_stack_executable .. align_args .. " " .. img_list

with

  local align_image_stack_command = align_image_stack_executable .. " -vv " .. align_args .. " " .. img_list

and then align_image_stack will print out more information about what is happening. If you can’t edit the file, then can you add the post the 2 images and I’ll try and see what the problem is.

Thank you Bill, as a windows user I unfortunately don’t know what file you are referring to for editing?

maybe you can post a couple of images here (with Creative Commons, By-Attribution, Share-Alike license).
We can try to process them to understand if the problem is in the images or in your DT setup

Here are two images I’ve been tinkering with in DT. thanks again
_GRI3962 - Copy.NEF (32.1 MB) _GRI3964.NEF (32.1 MB)

It works out of the box with your images, in few seconds, see the result (exported in jpeg and resized):

see the falling drop which has become double as it was in two different positions in the source images.

So it is definitely your setup. See my parameters

I suggest you double check again the align_image_stack.exe and convert.exe executable. Also, discard history stack from the source images and export to image_stack from lighttable, in order to be sure there is no different editing for the two images.
It must work!