The letter

One letter a week, starting soon.

The week's signal, what the makers shipped and what the reviewers found, and the editor's note. No tracking, no ads, nothing else.

We keep your address, your language and the date you joined, nothing else. Every letter has a one-click unsubscribe link that deletes the record.

Technique3 min read

LESSON 56

Focus stacking

Many thin slices, one deep image.

IN THIS LESSON

  1. What it is
  2. Why not just stop down
  3. In practice: capturing a stack
  4. In practice: merging and fixing

What it is

Focus stacking, also called focal plane merging, z-stacking or focus blending, combines several images taken at different focus distances into one picture with more depth of field than any of them. Each source frame is sharp in a different slice. Software finds the sharp parts of each, for example by detecting edges, and blends them. Because it happens in processing, you can also make versions with different depths and choose the best, or produce focus that no single lens setting could give. It is common in macro work and microscopy, useful in landscapes and product pictures, and the Mars Science Laboratory mission carries a camera, MAHLI, whose pictures can later be stacked.

Why not just stop down

The usual way to gain depth is a smaller aperture. In macro work that runs out fast: depth of field at close range is tiny, and beyond a certain f-number diffraction blurs the whole frame, cancelling the gain, while the light also drops. Stacking lets you shoot at the lens's sharpest aperture, often a stop or two down from wide open, and still get depth. The cost is time and a subject that holds still. Lesson 53 explains depth of field; lesson 39 explains macro reproduction ratios.

In practice: capturing a stack

This section is working practice. Put the camera on a tripod and set manual exposure and white balance so frames match. Focus on the nearest part of the subject and take a frame, then move focus a little further and take another, until you pass the farthest part. Overlap the sharp zones generously; gaps show as soft bands. For macro, a focusing rail that moves the whole camera in fine steps gives more even results than turning the ring. Many cameras now have a focus bracketing mode that shifts focus automatically between frames, which saves time and reduces shake.

In practice: merging and fixing

Also practice. Load the frames into stacking software or the stacking tool in your editor, and let it align and blend them. Check the result at full size. Common faults are halos along edges where a near and a far object overlap, smearing where something moved between frames, and patches where no frame was sharp. Small faults can be painted out from a single source frame. For landscapes, three to five frames focused near, middle and far usually cover the scene. For insects, stacks of thirty or more are common.

Try it today

  1. 01Put a small object with depth, such as a flower or a toy car, on a table.
  2. 02Set the camera on a tripod at its sharpest aperture and in manual exposure.
  3. 03Take ten frames, shifting focus slightly from the nearest point to the farthest.
  4. 04Merge them in software and look at the edges at full size.
  5. 05Compare with one frame at f/22 and decide which is sharper overall.