Focus stacking

Focus stacking is a method for increasing depth-of-field in photographs, consisting in merging a set of photographs obtained using focus-bracketing. In this post I explain how it works, and why it is specially useful in macro photography.

The image shown below is a close up of the adaxial  (upper) epidermis of a fallen sycamore (Acer platanoides) leaf. The image is an example of the use of focus stacking. Seventeen images were captured in sequence. After each individual image was captured, focus was slightly shifted. In each individual image only a part of the leaf surface is sharp, by merging the 17 images, retaining only the sharpest portion of each, an image with the full frame in perfect focus was obtained. Obtaining this kind of series of images is called focus bracketing while the image processing yielding the merged image is called focus stacking.

Acer platanoides

Autumn leaf from a sycamore tree (Acer platanoides)

I have produced an animation of the sequence of images at lower resolution. In this case, even though the object photographed is rather shallow, focus stacking still helps. The next two examples are of ‘deeper’ objects for which the advantage of using this method is even more dramatic.

The images of the leaf were captured with an Olympus E-M1 camera mounted on a tripod and tethered through USB to a computer and controlled with the free program Olympus Capture. The merged images and animation were generated with Helicon Focus using RAW images for the workflow. The merged RAW image was edited in Adobe Lightroom and JPEG files at reduced resolution produced for this post. In this example the focus shift between images was done with the objective, the uncertainty of the magnification is small because the object is shallow.

When working at high magnification an alternative approach is to change the distance between the camera and the object using a motorized focusing rail. This approach ensures that the magnification at different depths into the object remains constant. An example of the use of this approach can be seen below. For this final image a stack of 21 images was merged.

Aphids on barrel medic (Medicago truncatula)

I have produced an animation of the stacking process at lower resolution.

The images of the aphids were captured with an Olympus E-M1 camera mounted on a copy stand with a SatckShot motorized rail attached. The merged images and animation were generated with Helicon Focus using RAW images for the workflow. The merged RAW image was edited in Adobe Lightroom and JPEG files at reduced resolution produced for this post. In this example the focus shift between images was done by displacing the camera while keeping the focus setting on the objective unchanged.

The third example is not a macro image, however, photographing a plant from above and obtaining an image with the whole plant and the soil in focus, is difficult without focus stacking.

Barrel medic (Medicago truncatula)

I have produced an animation of the stacking process at lower resolution.

The images of the Medicago truncatula plant were captured with a Nikon D7000 camera mounted on a copy stand with a SatckShot motorized rail atatched. The merged images and animation were generated with Helicon Focus using RAW images for the workflow. The merged RAW image was edited in Adobe Lightroom and JPEG files at reduced resolution produced for this post. In this example the focus shift between images was done by displacing the camera while keeping the focus setting on the objective unchanged.

With good luck and perseverance it is also possible to obtain small series of focus-bracketed images when hand holding the camera by very slowly shifting one’s position forward while taking a series of images at high speed (several frames per second when working at high magnification).

I have here demonstrated focus stacking in macro and close up photography. It is equally useful in micro photography. It is also frequently used in product photography of static objects. In addition it can be used for landscape photography, but image processing may need some manual intervention as frequently some objects like leaves and branches which move are at different positions in the different images being merged.


I have used Helicon Focus, a specialised program for automated focus stacking, image alignment and merging, however, Adobe Photoshop can also be used. A diverse collection of impressive examples are available at the Helicon Focus web site  and in their Flickr group.


Conclusion: When the depth of field is not enough to include the whole object of interest, focus stacking provides a way for producing the desired images. In addition, use of focus stacking and aperture settings allows a more clear transition between in-focus and out-of-focus regions.


All illustrations, text and measurements are of my own authorship, and copyrighted.

(c) 2015-2017 Pedro J. Aphalo


 

Leave a Reply