Site description

Focus stacking

Focus stacking components
The ability to control depth of field (DoF) is one of the key skills in photography. Shallow DoF is very effective at directing the viewer to a particular area of the image. It also helps to separate the subject from a distracting background. Skilful use of DoF can create great compositions, especially (but not exclusively limited to) portraits. At the opposite end of the DoF spectrum, large DoF is usually the norm in landscapes to create sharpness right through from foreground to the far distance (effectively infinity).
As we know, DoF is determined by a combination of factors:
  • Aperture: higher the f-number higher DoF;
  • Focal length of the lens: the shorter the focal length, the greater the DoF for any given aperture and focusing distance, and;
  • The focusing distance: the shorter the distance from lens to subject, the shorter the DoF for any given aperture and focal length.

In landscape photography, we can use ‘hyperfocal distance’ (HFD) to maximise DoF, but that may still lead to some softness, especially in the foreground close to the camera (HFD is the focusing distance where the DoF stretches from infinity to half the focusing distance from the lens). For example, the HFD for my 18mm lens is around 3m at f5.6. For most purposes, that is good enough, but there may still be some softness.
However, it is where we are taking close-up or macro shots where DoF can be a problem. The extreme closeness of the focusing distance means that DoF will always be very shallow, even if a very narrow aperture (high f-number) is used. For example, the shot below was taken with a 100mm lens at f11, yet the DoF is very shallow
Stack 2

I have used a tape measure in this illustrative shot. It does show the detail of the end of the tape, but what if I needed the whole tape to be in sharp focus? This might be needed for a product shot, or an anatomical photograph of an insect, for example.

‘Focus stacking’ is a digital processing technique that allows us to take multiple shots, each identical in every respect except that each has been at slightly different focusing distances along the length of the subject. The more images you take, the better the result. In this case, seven images were taken, imported into Photoshop and ‘stacked’ as layers in a single file, and then the layers aligned and merged to create this.
Stack 1

Essentially, the seven images taken at f11 were done in such a way that the DoF of each shot overlapped, so that when the stacked layers are merged the DoF of each is preserved in the final version. The header image shows the final version with the component stack of images beneath.