Macro Flower Photography: A Tutorial in Focus Stacking

Editor’s note: This excerpt first appeared in photographer and author Harold Davis’ recent Focal Press book, Photographing Flowers: Exploring Macro Photography with Harold Davis.

The closer you get in macro flower photography, the fussier focus gets. Since “fussy” is not a technical term, let me explain. Because focus is inherently shallower as you get closer to your subject, slight variations of distance between camera and subject throw you out of focus very quickly, and even fully-stopped down you may not have enough depth-of-field for your entire photo to be in focus.

Certainly, stopping your lens down to its smallest aperture, observing whether you have the in-focus areas you want, and seeing if there is any way to position the camera to improve the amount that is in-focus is a good way to start. But bear in mind that stopping down a lens comes with some downsides: optically your lens may not perform best at its smallest aperture, and when the aperture is small you can’t use a shutter speed fast enough to stop motion.

An approach that often can surmount these obstacles is to use focus stacking: shooting at a number of different focal points and combining the images in Photoshop to create a hyper-focal image that has an extended area that is in focus.

The combination of images can be accomplished by hand-painting to select the areas you want or using automated layer alignment and stacking software (see text box below). Whichever method you choose, bear in mind that the more focal points you shoot, and the more images with differing focal points you bring to the party, the more successful your stacking is likely to be.

In my garden, I found a perfect poppy core that had formed after the poppy’s petals had fallen off. Quickly, before the breeze could blow the construction apart, I gently cut off its stem, and brought it inside to my studio with the idea of photographing the core close-up.

I didn’t dare put the poppy core down on a table because it would have immediately fallen apart. So, one-handed, I found a paper clip and bent it to make a small “stand.” I pushed the stem of the poppy onto the open end of the paper clip – and it fit perfectly. Then, I placed the poppy and its improvised stand upright on a black card underneath a light tent.

Photo: 85mm macro, 20 seconds at f/64 and ISO 100, tripod mounted

With the poppy core mounted on a paper clip, I decided to shoot an image showing the entire core in focus. It was clear that I would have difficulty achieving this goal in a single shot, so instead I made three captures: one focused on the front (top), one on the middle (center), and one on the back (bottom).

I made three shots focusing on different areas of the poppy core: first I focused on the front (top); next I focused on the middle (center); and then I focused on the back (bottom). I combined the three shots together in a layer stack in Photoshop and used layer masks to “paint in” the areas in each capture that were in focus. This combined version (below) is much more in focus overall than any of the individual captures.

Photos: 200mm macro, 3 exposures each at a different focal point combined in Photoshop, each exposure an 1/8 of a second duration at f/4.5 and ISO 100, tripod mounted


I placed the three shots together in the Layers palette in Photoshop in a layer stack (right – INSERT IMAGE: “Pg158-04-poppy layer palette”). I then used layer masks to paint in the areas in each photo that were in focus. When I combined the three layers by merging the stack down (below), I had — voilà! — a single photo with an extended range of focus.

How to do it in Photoshop: Automated Focus Stacking

Here’s how to create an image with extended focus using automatic focus stacking:

  1. With the camera on a tripod so it doesn’t move, shoot a number of frames using the same aperture setting but with different parts of the image in focus. Try to make sure that everything you want to be in focus is in at least one shot.
  2. Process the images in Lightroom or Adobe Camera RAW (ACR) using the same settings for each one, and load the photos shot at different focal points into Photoshop as a single layered document.
  3. In Photoshop, in the Layers Palette, select all the layers and choose Edit > Auto > Align layers to make sure all the layers are in alignment (even a tiny amount of movement on the tripod could ruin the focus stack).
  4. In the Auto-Align dialog, make sure to choose Auto as the projection method.
  5. To blend the images with different points of focus, choose Edit > Auto-Blend Layers.
  6. In the Auto-Blend Layers dialog, choose Stack Images as the Blend Method.
  7. Auto-Blend creates a mask for each stacked layer so that only the portions of the image that are in focus are visible. To continue working on your focus-stacked image, you can choose Layer > Flatten image to merge the layers down into one photo.
  8. You may need to crop your image slightly before continuing to compensate for any size adjustments created by the Auto-Blend feature. Also, you may have to retouch some areas of the image that didn’t align exactly right using the Clone Tool.

Harold Davis is an award-winning professional photographer whose work has been widely published and collected. He is the author of many best-selling books about photography, Photoshop, and digital art, including The Photoshop Darkroom series and Photographing Flowers: Exploring Macro Worlds with Harold Davis from Focal Press. Harold’s photography blog,, is read by more than 25,000 visitors each month. His latest book from Focal Press is Photographing Flowers: Exploring Macro Worlds with Harold Davis ($29.95). His next book, Photographing Waterdrops: Exploring Macro Worlds with Harold Davis ($29.95), is currently available for pre-order and will be available in June 2012.

Sign in or Sign up to post response

    • I use a Nikkor 105mm f/2.8 VR lens whose focal length changes as one shoots at very close range. This would change the apparent size of the subject, as well as its focus point. How would you suggest I deal with this problem?

    • To post a reply Sign In
    • Move subject or camera some milimeters with a focus rail manually or use an automated one (Stackshot)

    • To post a reply Sign In
    • There is also a tool called Helicon Focus to do this.

    • To post a reply Sign In
    • The first image with the paper clip was shot at f/64. Can you provide a crop of it matching the size of the stacked composite, which was shot at f/4.5? It would be interesting to see the difference.


      BTW, why were the stacking frames shot at f/4.5 instead of  f/64?

    • To post a reply Sign In
    • I have dabbled with focus stacking using a similar technique, and found it can be challenging in some cases. The composite in this article demonstrates one of them.


      While the center part of the composite is in focus from front to back, the two sides are not. The petals at the left and right are out of focus, creating an "unnatural" look.


      When I came across such a situation, I would shoot more frames focusing on the left and right petals. The shooting and stacking process can become quite tedious, and sometimes just won't work at all.


      The solid black background in the article's composite makes the stacking easier. If the poppy was shot in the field, dealing with  the background's focus is yet another challenge.


    • To post a reply Sign In
    • Coincidentally I have been looking into focus stacking during the last months as well. I have the impression that Helicon Focus gives better results than CS4, but at a steep price. I was pleasantly surprised by the results from CombineZ. This is definitely worth a try.

      With regard to focussing rails: forget the el-cheapo 4 way ones, they are not stable enough except for a p&s camera. Manfrotto's #454 micropositioning sliding plate is adequate but needs to be fastened after every repositioning. At next Photokina I'll have a look at Novoflex, theirs does not break the bank either.

    • To post a reply Sign In
    • SereneStacker is another popular tool among serious stackers; it produces high quality results and is easy to use.

      A focusing rail or a bellows is useful for stacking, especially when going around 1:1 where precise control can be a challenge if only the focusing of the lens can be adjusted.

    • To post a reply Sign In
    • What an odd article. Lots of space and explanation as to the self evident focus slices but nothing about the 'painting' aspect that is mentioned but IMO never explained properly.
    • To post a reply Sign In
    • It's not just a slight movement of the tripod that may change the framing.  As you focus by moving the lens forward and backward relative to the sensor, the distance between the lens and the sensor changes and so does the distance between the object and the lens.  The magnification, being the ratio of these two, will also change.  This still the case even for a lens design which does not change focal length when focusing.  So I expect you would always need some automatic adjustment to align the images.

    • To post a reply Sign In
    • I have used combineZM a few times...the first test I did was with a paper clip I shot just as a test on a desk...3 shots just as described here worked PERFECT....but I have tried it with flower shots, and the results have been similar to this result in the article...that is with bits hazy and mismatching....even using my focusing rail (I use a velbon one and it works good for me) it is still near impossible at times for various subjects with all sorts of lines and intricasies....

      I still want to tinker with this tool though more....the article was a decent primer to focus stacking...wish it went further to stress ways to get to a higher level of performance or perfection for focus stacking for us amateurs....

    • To post a reply Sign In
    • I can recommend the use of a Stackshot from Cognisys, for flowers the long 8 inch version is preferable, and the stacking I use and prefer is Zerene Stacker.

    • To post a reply Sign In
    • I found a software package Called Helicon Focus that automates the ENTIRE process.   Hook your laptop to the camera, the software does the rest.   I have had amazing results using it


    • To post a reply Sign In
    • I use Combine Z for most of my latest flower photos  ( ) and I think it is adequate in most cases. Creating the stack is the most crucial part of the process. I take at least 10 pictures  (steps) for one stack. That is probably too many, but if there is something wrong with one of the photos, it can be removed without disrupting the whole process.

    • To post a reply Sign In
    • Helicon Focus is a great and well-supported piece of software. Has been revolutionary for me in doing flower closeups.

    • To post a reply Sign In
    • I take it though that it still suffers the same as I have found Photoshop to do - where there is little 'detail' at the point of focus it messes up or is there some wizardry with algorithms and maths going on? For instance something like a white asiatic lilly flower, under very even lighting, shows very little detail on the petal surface.


      At some point in the future I expect cameras to 'scan' the whole subject and capture those parts it deems to be in focus, thus making a focus stack on the fly from the actual 3D scene and not 2D layers.

    • To post a reply Sign In

Sign in or Sign up to post response