top of page

Some Thoughts on Focus Stacking

  • Mike Lloyd
  • Jan 31
  • 4 min read

Getting all parts of a macro image in sharp focus can be challenging. Using a lens for close up pictures at small distances from the subject may mean that you will only have a few millimetres of depth in sharp focus. This phenomenon is referred to as a limited depth of field.

Stopping the lens down to a small aperture such as f22 may help, but may still not give sharp focus to all elements of the image. Small apertures cause a fall off in lens resolution due to an effect called diffraction.

One way of overcoming this difficulty is to use the technique of “focus stacking”. This is the practice of stacking multiple images taken with different points of sharp focus and then combining these images in the computer to give an image which is sharp from front to back. One can also use the taking lens at it’s optimum aperture to give the best optical resolution, typically two stops down from maximum aperture, (for instance a 105 mm macro lens with maximum aperture of f2.8 will give excellent results at f5.6). Some modern cameras offer the ability to take several images within a few seconds, and some will even stack them in camera and produce a stacked image for the photographer. If you don’t have the ability to do this last step in camera, Photoshop CC can do this successfully, and there is dedicated software such as Zerene Photostacker or Helicon Focus that will also do this.


Step 1 Recording multiple images.

If you have an older DSLR or a camera that is unable to automate taking multiple images, you will have to perform this process manually.

Put the camera on a tripod. Using the rear screen is easier than the viewfinder. Older DSLRs can be used in “Live View” mode. Manual focus and manual exposure should be used with focus peaking if available. The exposure should be identical in all exposures hence manual exposure.

Set the aperture to an optimum setting e.g. f5.6 to 8, and a low ISO setting for maximum noise free quality. Start by focusing on the structure closest to the front of the lens and make the first exposure. Repeat the process as you progressively move the point of focus to the rearmost element of the subject. It is good practice to use either the delayed shutter function or an electronic cable release so that the camera is not vibrated during the process.

Modern mirrorless cameras will usually perform this process automatically. It is often referred to as “Focus Bracketing” to distinguish it from “Focus Stacking” which is the computer post production process. The user’s manual will tell you how, as various makers have different foibles in this regard.

How many images you combine may be dictated by how fast your computer is, and the degree of fine detail that you wish to capture. Stacks of up to 100 or more images can be used, but commonly 20 or 30 images will be plenty.

It is possible to use a focusing rack to physically move the camera forward by tiny increments if you are doing the shots manually. Alternatively, you can move the point of focus without moving the camera physically, for each shot.

In the past, jpeg format was advised as these are smaller file sizes, but modern powerful home computers can often cope with bigger RAW files with possibly better quality.

 

Loading And Processing Images.

You may wish to open Photoshop and look at your images individually and decide which images you want to stack. Some of the images which do not have any of the subject in sharp focus can be disregarded. Once you have identified the images that you wish to stack, we can start the process.

 

In Photoshop go to FILE…..>SCRIPTS

LOAD FILES into STACK…..Browse and locate files to be opened.

 Click all the files and they will load into the box.

 Check AUTO ALIGN option then hit OK.

Go to SELECT…. click SELECT ALL LAYERS

Go to EDIT….>SELECT AUTOBLEND LAYERS making sure that you have clicked “Stack Images” and “Seamless Tones and Colours” …

The next step requires a bit of patience as the computer will take some time to auto blend the pictures. This will depend on the number of images in the stack, the size of the images, and the power of the chip in your computer. This is where there may be an advantage to using jpegs!

Finally…. Go to LAYERS…>FLATTEN IMAGE. Your final image will then appear and can be edited in the usual way.

It is not unusual to have a few areas that may appear “smudgy” or have “ghosting” and this may be an artefact of the imaging software or may mean that you haven’t put enough images into the stack.

I have found that recent versions of Photoshop are good, but the experts tend to use the purpose made stacking programmes to produce high quality images using multiple image stacks.

 The same technique can be used in landscape photography, to get the pebble in the foreground and the rock formation at the end of a valley in sharp focus. Some judges don’t like this technique as it does go against natural perspective, it’s all a matter of personal taste.

An example of a photo stacked image is included and was a colourful Amaryllis bloom from a Christmas present.

It was photographed against a white background with two LED video lights illuminating the bloom. I should have dialled in a little over exposure if I wanted to get a truly white background but forgot to do this!

I have included the first and last images from the stack that I used. You will see that on the first image (Image A) the foremost stamen is in sharp focus. The second image (Image B) shows the most distant edge of a rear petal in sharp focus. I included all the frames between these two in my stack. The next image (Image C) shows a good focus stack of the bloom against a grey and unattractive background. To get a pure white background, I used

Select….>Subject….> Inverse….>Image Adjustments and increased exposure and decreased contrast to produce a featureless white background as in the final image (Image D).


Image A
Image A
Image B
Image B
Image C
Image C
Image D
Image D


bottom of page