Skip to content

The making of; focus stacking.

Focus stacking is one of those photographic techniques which can be critical if you need it, but fun if you don’t. Either way it can be a fair bit of work to undertake. The attraction for me is simply that I like to try everything at least once, for the sake of knowing how it’s done. As a result, my example images aren’t particularly meritorious. And I have to say, I spent a lot of time producing them (garbage in, garbage out :))


Weird Leaves

What focus stacking does is to take a number of images of the same subject, focused at slightly different distances so the end result is an image perfectly in focus from foreground to background. This is particularly useful in two situations; macro and landscape photography.

Macro photography in particular usually results in very narrow depth of field, as is always the case when the magnification is very high and the focus distance very close. The image above results from stacking 7 images. Without stacking you could see the top of the leaf structures in focus, or the base but not both. The problem is more pronounced in this case because the leaf curves away from the lens. Those little buds on the leaf are only about 4mm across.

In the case of landscape photography, a scene can be very deep from foreground to background. Using a view camera, the movements (tilt & shift) can be used to increase the apparent depth of field and render the scene in focus from front to back. But if you don’t have a view camera, then focus stacking can be your solution to high resolution landscapes, focused from front to back.

I don’t have any landscape photos done using the technique, unfortunately. Never got around to trying it, so here is a photo of a pawpaw (papaya) instead :).



The technique is useful anytime very high depth of field and resolution are required, I’ve just given two examples (macro & landscapes).

Now as regards the practical aspects of focus stacking, you must have a tripod. For macros, you will need a lens that focuses closely (preferably an actual macro lens, as opposed to one marketers believe is a macro lens). You point the camera at a scene you want to photograph and start taking photos starting from either the furthest focus point and working closer or vice versa.

A fairly gently curved surface like the pawpaw above doesn’t require many shots. Using the macro lens, the depth of field is a milimetre or so when focused on this, so as the curve was greater towards the peak, more shots were needed to keep focus for each shot. Relatively fewer were needed as focus moved across the flat surface.

Because focus was significantly closer for the leaf above the depth of field was significantly less and more shots were needed to keep everything in focus when they were eventually stacked. The number of shots you need will eventually become easier to judge as you do more of these.

Although I haven’t completed any landscapes as yet, the system would be very similar save that depth of field would be greater (relative to a macro) for each shot.

When taking macro shots there is an issue to look out for; changes in field of view as focus moves from closest to farthest. You will notice that with the closest focus, the field of view will be narrower than at the furthest focus point. So you will need to set your composition with focus set at the closest focus point. The effect is not likely to occur with a wide angle lens used for landscapes (or is likely to be negligible).

The next step is the software. These is a variety of different software packages you can use. The ones I’ve tried are Zerene Stacker and CombineZM. I know Helicon Focus also has a good reputation. Helicon is well promoted commercial software and appears to be the most polished of the packages, but I’ve never tried it.

Zerene is also commercial software but is not quite as polished as Helicon. They do have a generous trial period which I made use of. It was clear to me though, having used it only once, that it would not be worth it to me to pay for something that I would use so rarely. It is a complex piece of software, as you would expect. I’ve made use of the guidance that is available on their site which quite a bit more competent that anything I can produce from memory.


Flowers, for a change.

CombineZM is the one I’ve used most often. Free, open source and very rough. But given the rare use I’ve made of the technique, the price is perfect. They have a very complete and useful help page. Again, their help is better than anything I can produce.

The bottom line with focus stacking is that, in the right hands and with the right motivation, amazing images can be produced.


17 images combined.

Share Our Posts

Share this post through social bookmarks.

  • Delicious
  • Digg
  • Newsvine
  • RSS
  • StumbleUpon
  • Technorati


Tell us what do you think.

  1. Dwayne says: February 21, 2011

    Very nice article. Another good example is having someone with hands outstretched to the camera with any object in their hand and you’re trying to get both the object and the face of the person in sharp focus. (It would be a bit difficult since the person might be likely to move even if just a little).
    What were your aperture values for these test pieces? Were you using available light. What if you added artificial light and were able to stop down to f22 or even smaller. You’d gain a bit more DOF and might need fewer frames to combine. No?

    • Nikhil Ramkarran says: February 21, 2011

      You are absolutely right Dwayne, stopping down will give you additional depth of field, but once you go beyond a certain f-stop you are losing resolution, as you run into diffraction effects from the smaller aperture. I rarely go beyond f/8 with the macro lens if I can help it. I think all of these were done using available light, and because I was using a tripod, the shutter speed didn’t really matter,

  2. Fidalb says: February 21, 2011

    This is good to know. First time reading about this technique.

  3. Michael Lam says: February 21, 2011

    Nice post Nik, This is one of those techniques that I have yet to try, and given the beauty of the images that you’ve gotten I think I should try it sooner than later 🙂

  4. Jimmy D says: February 22, 2011

    This is an fascinating technique that you seem to handle very well, Nikhil. It looks like a great way to shoot architecture as well – have you tried that? Or maybe the issue of changing fov is a more tricky problem when dealing with straight lines?

    • Nikhil Ramkarran says: February 22, 2011

      My only problem is when I’ve tried it once I feel almost no motivation to try it again 🙂 This one does have some interest though, I have to try it with a landscape or two. As far as architectural photos go, you would need a lens that doesn’t change field of view at all when it focuses. I am now curious to try it though.

  5. Srmarek says: March 1, 2011

    Wow Nikhil! I”ve neve heard of this technique. I think your images are great but the orange flowers, #3, are unbelievable. The clarity is amazing! Thanks for sharing this article.


Websites mentioned my entry.

There are no trackbacks on this entry

Add a Comment

Fill in the form and submit.

%d bloggers like this: