This is a stack of 7 images, you can click on the image to see the full resolution and guess what the subject is :D

The photos were taken using a Nikon D7500 camera connected through a T2 adapter tube with 2X magnification (NDPL-1(2X)). Microscope is the Swift SW380T. The objective is a 4x Plan objective.

For stacking the images together I use three tools: ImageMagick’s mogrify to transform from the raw NEF files to .tif, Hugin’s align_image_stack function to align the images, and enfuse to blend the images together.

The output .tif file was post-processed using rawtherapee in order to increase local contrast and tune some other parameters.

The process of focus stacking a set of images is rather simple in Linux. The programs above can be installed via the package manager. Then, you copy the raw files to focus-stack into a folder, and run the following sequence of commands:

(1) Convert from RAW to TIF:

mogrify -format tif *NEF

(2) Align images

align_image_stack -a aligned_ -v -m -g 10 -C *.tif

(3) Focus stack

enfuse -o result.tiff --exposure-weight=0 --saturation-weight=0 --contrast-weight=1 --hard-mask aligned_*

Below are the images used for the stack after alignment, for reference: