What is the easiest way to focus-stack photos, and with which software, on Fedora linux?
What I have tried so far:
Exported 4 32-bit tiffs from darktable.
Installed enblend by dnf.
From the export directory I tried: enblend *.tif. It complained the first file did not have an alpha channel.
Have I done something wrong by exporting 32-bit TIFFs? (I don’t see an option about alpha channels). Or is there better software to use?
I’m not at my computer now (on my phone) but these references may help – both specifically and generally:
-
Shane Milton’s YouTube tutorial with enblend (no syntax) - - YouTube
-
John Barrow’s YouTube tutorial with enblend - Focus Stack Tutorial for Linux using Enfuse in the Terminal - YouTube
-
Nick Page’s YouTube tutorial in Photoshop - How to Focus Stack in Photoshop // Tutorial - YouTube
-
focus-stack tool by Petteri Aimonen -
GitHub - PetteriAimonen/focus-stack: Fast and easy focus stacking
focus-stack sounded ideal and indeed works beautifully.
To install on Fedora all I had to do was:
sudo dnf install opencv-devel
make
sudo make install
Then I found it complained it couldn’t handle 32-bit TIFFs so I re-exported as 16 bit.
Then focus-stack *.tif just worked.
I often use a Cognisys rail controlled by entangle
You can also carefully, manually twist the focus ring in incremental amounts.
I also have HeliconRemote, which electronically twists the focus ring. HeliconRemote is free but Mac/Windows only. Wine? I use my Mac if I want to use HeliconRemote.
Focus ring twisting is better for landscapes and large objects.
Camera moving (Cognisys rail) is better for super macros of tiny objects.
Shoot may 30 raws? Use the darktable-cli to convert to tif, in a bash loop.
Then use ZereneStacker to stack with. Zerene is not open source but it is cheap and it is a one time fee rather than a subscription. The guy who makes it is a good guy. I like to support independent crafstmen. ZereneStacker is very good software. Java too, so it runs on all platforms. We spend thousands of dollars on hardware. What’s wrong a hundred bucks for damned good software?
Stack to a single tif. Then use Darktable (or Ansel) and Gimp to process that single tif.
#!/bin/bash
suff=‘nef’
exempee=~/bin/ztackit.xmp
if [[ -n $1 ]]
then
suff=$1
fi
if [[ -n $2 ]]
then
/usr/bin/darktable $2
exempee=$2.xmp
fi
if [[ -n $3 ]]
then
crop=$3
fi
mkdir tifs 2>/dev/null
crop=0
shopt -s nocaseglob
for file in *$suff
do
##echo $file
##/opt/darktable/bin/darktable-cli $file $exempee tifs/$file.tif 2>/dev/null
##/opt/darktable/bin/darktable-cli $file $exempee tifs/$file.tif
/usr/bin/darktable-cli $file $exempee tifs/$file.tif
done
if [[ “$crop” -gt 0 ]]
then
for file in tifs/*tif
do
convert $file -shave 6x6 delme.tif 2>/dev/null
cp delme.tif $file
done
fi
I sometimes put 6" inches of extension tubes behind a macro lens, in front of a bellows to get microscope like magnification. That Jerry rig often puts a few pixels of artifact borders around each frame, which confuses stacking software. So in those cases, after making a 30 or 40 exposure stack you have to crop each exposure a few pixels, before stacking.