Depth of field defines, quite simply, the amount of your subject which is in focus, or, in other words, the distance between the nearest and the farthest parts of the image subject which are in acceptable focus.
Here I've arranged 8 coloured felt tip pens in parallel, leading away from the camera. In this experiment the camera (Pentax K-1) was mounted on a very firm tripod and had a Pentax 100mm macro lens mounted. I used ISO 200 and an aperture of f/8. Exposures were around half a second. I just took 8 pictures, with a different pen in focus each shot, going front to back. You can't achieve reliable focus positioning by peering through the viewfinder, so I was using Live View, in which what the lens sees is displayed on the screen. I switched on Focus Peaking, which causes a highlight to appear around in-focus parts of the picture.
In this picture:
you can see that the pink pen was in focus
and in this one:
the penultimate pen, the purple one is focussed.
After focus stacking the 8 originals, here is the result:
Perfect focus, from front to back. I'm prepared to guarantee that such depth of field would be impossible with normal cameras and lenses, and the only way you could get this picture with a single shot would be to use an extraordinarily expensive and complex large format view camera with its lens tilted.
I think my next scene is perhaps more impressive. It's a group of simple objects displayed on a grey towel (no expense spared here) ranging from about 12 to about 30 inches from the lens. This scene required 14 individual exposures in which, as before, focus was progressively moved away from the camera. Here are a couple of examples:
You can clearly see how narrow the depth of field is in each of these pictures.
But focus-stacking the 14 images provided us with this:
Which I think is quite remarkable! (Even though I seem to have slightly missed focus on the brown pen.) The watch seen in the picture was not running - I wonder how the focus stacking software would have dealt with the stack if the second hand had been moving?
My examples here have been kitchen-worktop/old grey towel setups. But why should focus-stacking be limited to macro work? Why not go out somewhere with scenery, set the camera on a low tripod, and snap away, covering that tiny flower just inches from the lens right up to the distant snow-capped mountain? The possibilities are endless!
So far I've shown you what can be achieved with focus-stacking, but how is it done?
Well, one way would be to bring each picture into PhotoShop (or similar) on its own separate layer, then you could manually mask off the out-of-focus parts of each layer with a virtual brush, thus making them transparent and allowing only the good bits to shine through - if you've got hours to spare, that is, because it's a time-consuming business.
Or you could use a software product, loading each of your pictures into it in a group, clicking 'Go', and waiting while it does everything for you. There are a few around, but I used a product called Zerene Stacker for my work. It's very simple, but very clever. You simply select the pictures, drag them over to the left hand pane of the software, and watch the right-hand pane as the end result is built up. It just knows what's in focus and what isn't! It will even attempt to align the pictures if, for example, the tripod moved slightly. The other major player in the field is called Helicon Focus, which I haven't tried, but I daresay it's equally clever.
If you want to have a go at stacking - and you really should - you can get hold of 30-day trials of both Zerene and Helicon and see which you prefer.
I've put album of various other stacks and explanation on the next page. Please have a look. I'm proud of this work!