Trying to explain focus stacking

This post references my last article on stacking.

When you take a photograph, whether you make the decision or the camera, there are essentially only three settings involved: aperture, shutter speed, sensor sensitivity.


how wide an aperture you use is denoted by its F stop number. Perhaps counterintuitively a small number means a big aperture (hole for the light to come through and hit the sensor). A bigger number means a smaller aperture. The important aspect is that big apertures create shallow depth of field (DoF) = how much of the image is in focus in front of and behind the chosen focus point. Small apertures give increasing DoF as the aperture narrows.

Shutter speed:

How long the aperture remains open to allow the light to hit the sensor.

Sensor sensitivity:

is like the old ISO (or ASA) of film. Film had grain and a low ISO number meant fine grain. Sensors have digital noise and this is a very unscientific equivalent of grain.

In focus stacking the critical aspect is DoF. When I shot the flowers I wanted only the flowers in focus, not all the distractions around them. To get them in focus from front to back needed a small aperture. Probably something like F16 or F22. The problem then was that all the distractions are also sharply in focus. So how did I achieve the end result?

I selected a large aperture (F5) that gave me a shallow DoF. So when I took my picture only part of the flower could be in focus. However providing the flowers did not move I could and indeed did take a series of photographs with each frame focussed on a different part of the flower. Usually I try to start with the point furthest away and work forwards but it does not matter. In this case I took 15 frames. Each one looks odd in isolation because only a thin segment of the subject is sharp.

The next step is to import or transfer the 15 files into a software programme that will select the sharpest part of each frame. The 15 sharp portions are blended so that they form a single in-focus subject whilst leaving everything else out of focus. I used a programme called Helicon Focus. Photoshop will do it. In some cases PS is better but Helicon Focus is very, very fast compared to PS. I then saved the blended frame into Adobe Lightroom.

Shutter speed has little relevance here. I want as little grain or noise as possible so I set the ISO to as low a number as possible. I used ISO 200.  The shutter speed in effect is the balancing item to give me the correct exposure. If the breeze had been blowing the flowers I might have tried a higher shutter speed and allowed the ISO to be the balancing item. More likely I would have given up.

There is no formula for how many frames you need. In a studio you might shoot 100. With something that itself has a shallow plane you might use 3 or 4. For a landscape you could use a high F number – maybe 11 or even 16 and just shoot 3 to make sure the frame is sharp from front to back. It is test and learn.

Finally I used PS to remove two tiny blemishes on one of the petals and added a vignette to help focus the viewer’s eye on the flowers. I did some additional burning (darkening) of any remaining lighter areas. The whole processing time was less than five minutes.

There are people out there who are far more expert than I and if they wish to add or correct my explanation please leave a comment.


Here is an example of a single frame – I’m not sure whether the crop is identical – it is for illustration purposes only. You can easily see that only one leaf – and everything that falls within the same plane of focus – is sharp. The software will identify that and the sharpest areas of the other 14 frames to generate the final image.


16 thoughts on “Trying to explain focus stacking

  1. Ta. Are there any free programmes that do it? People keep sending me photoshop but Hal refuses to accept them. I vaguely remember those clever terms from our SLR manuals (in the days when you got manuals). It’s the stacking I didn’t know about. And how is that different from multiple HDR images? Too many questions for a Monday. Go back to sleep roughseas ….

    • HDR is about harmonising the dynamic range so that you can have detail in shadow and highlight areas if the single frame cannot deal with the breadth. So if with a single frame you can have either shadow detail or highlight detail but not both then you can shoot the same frame with different exposures. One might give you shadow detail, one a standard exposure for the mid range and a third for the highlights. Then again you blend them to get an even dynamic range. The eye adapts. A sensor can not. I don’t do HDR is that’s about all I know 🙂

      Free programmes? I don’t know of any but there might be. The best I expect you can do is to get a 30 day free trial to see if you want to buy. I think Helicon Focus is or was US$200 for a lifetime licence.

      • Ah ha! Now I’m beginning to get the picture. It seems like a lot of work but it’s all beginning to make sense. This is really interesting and thank you for your time spent in explaining how this is done and for the example. I wish that I lived 1,000’s of miles nearer as I’d love to spend a day(s) with you learning the tricks of your trade and get some serious and photography tuition no doubt with a load of ‘larfs thrown in for good measure!

  2. I’ve been clicking back and forth, Andrew to get the single frame vs multiple view… and reading your explanation,… wow… I now have a better idea what goes on before a picture ‘passes’ for posting… Air brushed, almost like super models of Nature. I like that thought. 🙂 xPenx

  3. Hi Andrew, a good explanation about what focus stacking is. Coincidentally i am in the middle of planning a series of posts about image quality and stacking is one of the areas I am going to write about.

  4. Interesting. I didn’t know that this is one way of getting a super-focused image with a very shallow depth of field. Always thought that a large-enough aperture setting (e.g. f5.6) would do the job. Thanks for sharing!

    • F5.6 doesn’t give you much DoF with a full frame sensor – better on others (micro 4/3 etc). The trick is to use the DoF Preview button if you have one or Live View again, if you have it. If you need a lot of DoF I would be thinking F11 or more. It also depends on how far you are from your subject of course.

      • I shall have to test it out one of these days. I prefer having more depth of field most of the time as I like having the context. Then again, I hardly ever take macro photos 😉

  5. I learned the basics, F stop, shuuter speed and DoF, at 15 when I bought my first camera, an Olympus PenS, but the extra lengths you went to to achieve the end result were fascinating and far beyond anything I would ever do.

    But I have another point, totally off-topic, I want you to check out a video clip on today’s post, it’s some strange white bugs. I’ve addressed a comment to you there, you’ll see why. Appreciated.


I'd be delighted to hear what you think

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s