How to Focus-Stack Macro Images using Photoshop - Digital Photography School

How to Focus-Stack Macro Images using Photoshop

Open

One of the biggest challenges facing macro photographers is getting your subject in focus. Not only is hitting the perfect focus point an exercise in frustration, but often you don’t have enough in focus. Unlike a landscape photographer who can set their aperture to F/22 and be happy, a macro shooter will likely be rewarded by blurry images – and even if they are sharp, the focus still won’t magically spread from edge-to-edge. The best solution is to use a technique called “focus stacking”, which combines multiple frames together to increase the area of the image that is in focus.

Focus stacking requires you to photograph your subject at every single possible focus point you’d like to have sharp, and then combining those images together to get one image where everything has detail. There are tools to achieve this – dedicated tripod accessories called “focus rails” and dedicated software for combining images (Helicon Focus and Serene Stacker are two I’ve used before). For this article, let’s keep things simple with what you already have: no tripod required, and we’ll be using Lightroom and Photoshop.

pollen inside a flower. Each grain of pollen is 70 microns long and the image is created using 16 separate frames for increased focus

pollen inside a flower. Each grain of pollen is 70 microns long and the image is created using 16 separate frames for increased focus

Shooting:

There are a few tips to get started with hand-held shots intended to be focus-stacked. Firstly, you’ll want to set your camera lens to manual focus and leave the focus ring set to the closest focusing point. On a dedicate macro lens, this would generally mean 1:1 lifesize magnification. From this point forward, you won’t be changing your focus by the lens, but rather moving the entire camera forward or backward to get your subject in focus.

You’ll also want the camera on continuous shooting. We’ll be firing off as many shots of the subject as possible as quickly as we can.

Using flash is a good idea, as this allows you to keep a faster shutter speed and help ensure that all of the resulting images are free of motion blur (from either the camera or the subject).

When you’ve found your subject, the most critical element of shooting is that you only move the camera forward and backward. Any major side-to-side, up-and-down shifting will create a change in perspective which makes focus-stacking much more difficult. This takes practice, but I find if you hold the end of the lens securely and find something to brace yourself with, the results are better.

water droplets refracting the image of a flower on a spider web. 20 separate frames were used to bring the entire image into focus

water droplets refracting the image of a flower on a spider web. 20 separate frames were used to bring the entire image into focus

If holding an off-camera flash, holding the end of the lens and the camera seems daunting – it is. Doing it all yourself isn’t impossible, but you’ll find it easier with an assistant holding the flash or using a ring flash to simplify the equation.

Fire away, and take far more images than you think you need. Move the camera forward and backward through the focus area and drastically overshoot. When putting a macro image of a snowflake together I may use 40 frames, but I’ll shoot 200. This is necessary because you’re shooting in uncontrolled intervals of distance and may miss a spot.

Starting in Lightroom:

Once you have your images imported into Lightroom, you’ll need to start selecting an image from each focus point. Clear your world from distractions, because you’ll need to make a mental note of which areas of focus have already been selected and which ones you still need to find as you look through your images. I flag the images I need with a “pick” flag (P key) and move on searching for the next missing frame.

3

When I think I’ve found all of my focus points, I’ll typically choose a central frame and apply any global adjustments I’d like to make to the RAW data. Exposure adjustments, noise reduction, white-balance correction, etc. When I’m happy with the general look, I right-click on the image and select “Develop Settings > Copy Settings”. Make sure the changes you made are checked, and copy.

You’ll now need to filter your images to just see the “picks”. This is done by choosing “flagged” from the filter dropdown box in the lower right above the filmstrip. Now you can select all of your flagged images, right-click on one of the thumbnails and choose “Develop Settings > Paste Settings”. This will apply the adjustments you made to every frame.

4

Still having all of your images selected, right-click on one of the thumbnails again and choose “Edit In > Open as Layers in Photoshop…” and then Photoshop will take over the next part of the process.

Moving into Photoshop:

Once all of the layers have been loaded, select all of them in the layers palette and then from the top menu, choose “Edit > Auto-Align Layers…”. This will take all of your images and adjust for the slight horizontal, vertical and rotational shifts that occurred when shooting the images. Photoshop does a pretty good job and re-aligning your images as long as you didn’t move too far out of perspective.

5

At this point, we’re going to assume that you’ve missed at least one section of focus from your image, and we need to find what your missing puzzle pieces are. From the same menu with all of the layers still selected, choose “Edit > Auto-Blend Layers…”. On the dialog box that is displayed, be sure that “Stack Images” and “seamless tons and colours” are selected. Click okay, and the stacking algorithm goes to work combining the images. Your jaw might drop at this point when you see the combined image. However, zoom in and look closely and you’ll likely see something similar to this:

6

One section of the snowflake is clearly out of focus, as if one “sliver” of focus was missed when I initially selected by frames. At this point, I go back to Lightroom and find my missing frames, paste the adjustment settings on them, and flag them as a “pick”. Select all of the images again, including your missing pieces and choose “Edit In > Open as Layers in Photoshop…” once again. Now we’ve got all of our pieces to work with!

compare with the above image – this one is exactly the missing piece of the puzzle

compare with the above image – this one is exactly the missing piece of the puzzle

Back to Photoshop, follow the same process as before by selecting all the layers and choosing “Edit > Auto-Align Layers…”. After that’s done, we’re adding a step before blending. Photoshop’s auto-blend tool works well, but makes all kinds of mistakes. We’ll need to fix these manually, so after aligning but before blending, you need to right-click on your layer stack and select “Duplicate Layers” (CTRL+J is the keyboard shortcut).

Now with one “set” of layers selected (this should be selected by default), choose “Edit > Auto-Blend Layers…” and make sure the dialog box is set as before. If your computer has limited RAM and CPU power, this may take an extremely long time if you have many frames open. For the image I’m working on, I ended up using 46 frames, which means Photoshop now has a total of 92 layers open, each containing an 18MP image, and we’re asking it take half of them and compute some very heavy math. If you haven’t had lunch yet, go make a sandwich. Here’s what we get when the process is complete:

image also cropped square

image also cropped square

Refining the results:

Your image is getting closer, but if you zoom in you’ll find all sorts of “defects”. See if you can spot them here:

9

Backgrounds come in strangely at times, sharp edges at different depths become blurry and slight alignment issues pop up. We’ll need to fix this by masking in the proper pixels from the original set.

First step: merge your current blended stack together (CTRL + E keyboard shortcut). You’ll now take this stacked layer and drag its position down to the bottom of the layer order, underneath all of the un-stacked images. You’ll then have to turn off the visibility of all the un-stacked layers, by click on the eye icon to the left of the layer thumbnail.

Now the fun begins. Create a layer mask on the layer directly above the “finished” layer, and get friendly with the invert keyboard shortcut (CTRL+ I). You’ll bounce back and forth with the invert command on the layer mask and look at the area where that particular layer has focus. You’ll switch back and forth until you notice an area that looks better on the original layer vs. the “finished” layer and, using your brush tool, mask in the appropriate pixels to fix the mistake.

Do this for all layers and expect it to take some time. Let’s compare the above mistakes to the refined results:

10

Look closely and you’ll see many “fixes” applied to just this small section of the image. The process can take hours depending on the number of layers, the number of mistakes, and how much of a perfectionist you are.

In the case of a snowflake photographed on a black mitten, I want to remove as many fibers as possible from the finished result. This is accomplished largely in the above-described fixes, by selecting the layer which has the most-forward focus and masking its background into the completed image:

11

At this point, you’re back to standard Photoshop work. Use your clone tools to clean up anything you didn’t already fix, and adjust the image to your liking. With most macro subjects, you can also choose to rotate or flip your image around for the best composition. An insect looks perfectly natural up-side down and backwards – if it aids in your composition, don’t be afraid to play!

For the average snowflake image, it’s a 3-4 hour process from beginning to end, combining typically between 30-50 frames. Depending on your subject and the level of magnification you’re working with, you may only need 6 frames. The process however, remains the same:

12

The Snowflake Book

If the tutorial above interests you, it will be spelled out in greater detail in my upcoming book, “Sky Crystals: Unraveling the Mysteries of Snowflakes”. The book is currently available for pre-order, to be released in October 2013. Help support the book project!

13

The book will be 300 pages, hardcover and detail all of the photographic techniques, science & physics, and even the psychology and philosophy of why we find snowflakes beautiful.

Check out more of Dons work at http://www.donkom.ca/

If you enjoyed this article, you might also like...

Read more from our Post Production category.

Don Komarechka is a Canadian nature & landscape photographer. His work revolves around unique perspectives and unseen subjects. Don has recently published a book on snowflakes and macro photography and his work can be seen on his website or on Google+.

  • http://www.phogropathy.com John Davenport

    Holy crap man this stuff is gold! I love macro photography (though I don’t own a macro lens yet other than the silly Olloclip attachment for my iPhone) I still love it and would definitely love to do this kind of stuff in the future when I can get my hands on a lens.

    Nice job on the walk through and explaining everything along the way. I guess I’ve got a long way to go from my macro of an ant I suppose.

  • http://www.herviewphotography.com Darlene Hildebrandt

    Funny enough Don I just shot some images last week using my 50mm lens reversed so I’m eager to actually try this!

  • http://www.jayjalaramext.com Jay Jalaram Extrusions

    Excellent trick, much nice 1. A bit time consuming but its ok as it gives result. Thanks

  • https://marius-fotografie.blogspot.com marius2die4

    This is a good stuff. I will try!

    Some of my pics:
    https://marius-fotografie.blogspot.com

  • http://igg.me/at/skycrystals/x/1642596 Don Komarechka

    Thanks very much for the compliments on the walk-through John! I’m thrilled that even though you can’t immediately use my tips, you’re excited at the possibilities – the mark of a forward-thinking photographer! :)

    Very cool Darlene, would be great to see some of your results! Anything worth focus stacking as a result?

    Thanks too Marius.

  • Mike Harris

    Fascinating article, thanks for sharing your knowledge.

  • http://focusedmoments.net Rachael

    I use precisely this technique for photographing insects. Nice job explaining it. One thing that frustrates me about this invaluable technique is that it automatically disqualifies my images from most nature competitions, where layers are not allowed. Presumably there is a feeling that this is somehow not true to the subject, which frankly I do not understand since one is not changing anything, just maximising depth of field.

  • chauncey

    Don…I’ve done some photo stacking but, not in the detail that you expose in this great tutorial…thanks!

  • http://www.marcvellekoop.com Marc

    This tutorial really got me excited! Thank you so much for sharing, I can’t wait to get into it!

  • http://www.photosbykag.com K.A. Gilligan

    Great article. I don’t tend to shoot a lot of macro shots, but the next time I do, will surely consider this. Well done!

  • Schoff63

    Fascinating article with great tips. I will definitely follow these tips with my macro lens. I just got it and only used it a couple of times. So far the pictures I’ve taken have come out pretty good. Thanks for the article.

  • Don Komarechka

    Thanks for enjoying the article! Macro photography involves delving into an unseen world and the technical challenges can be great…. expect a few frustrating and puzzling moments and you learn! That said, it’s very much worth the challenge. :)

  • Lara Constantine

    Very good! Thank you!

Some older comments

  • K.A. Gilligan

    June 23, 2013 05:51 am

    Great article. I don't tend to shoot a lot of macro shots, but the next time I do, will surely consider this. Well done!

  • Marc

    June 8, 2013 10:09 pm

    This tutorial really got me excited! Thank you so much for sharing, I can't wait to get into it!

  • chauncey

    June 4, 2013 09:16 pm

    Don...I've done some photo stacking but, not in the detail that you expose in this great tutorial...thanks!

  • Rachael

    June 4, 2013 04:51 pm

    I use precisely this technique for photographing insects. Nice job explaining it. One thing that frustrates me about this invaluable technique is that it automatically disqualifies my images from most nature competitions, where layers are not allowed. Presumably there is a feeling that this is somehow not true to the subject, which frankly I do not understand since one is not changing anything, just maximising depth of field.

  • Mike Harris

    June 1, 2013 01:01 pm

    Fascinating article, thanks for sharing your knowledge.

  • Don Komarechka

    May 31, 2013 11:54 pm

    Thanks very much for the compliments on the walk-through John! I'm thrilled that even though you can't immediately use my tips, you're excited at the possibilities - the mark of a forward-thinking photographer! :)

    Very cool Darlene, would be great to see some of your results! Anything worth focus stacking as a result?

    Thanks too Marius.

  • marius2die4

    May 31, 2013 05:34 pm

    This is a good stuff. I will try!

    Some of my pics:
    https://marius-fotografie.blogspot.com

  • Jay Jalaram Extrusions

    May 31, 2013 04:50 pm

    Excellent trick, much nice 1. A bit time consuming but its ok as it gives result. Thanks

  • Darlene Hildebrandt

    May 31, 2013 01:55 pm

    Funny enough Don I just shot some images last week using my 50mm lens reversed so I'm eager to actually try this!

  • John Davenport

    May 31, 2013 02:33 am

    Holy crap man this stuff is gold! I love macro photography (though I don't own a macro lens yet other than the silly Olloclip attachment for my iPhone) I still love it and would definitely love to do this kind of stuff in the future when I can get my hands on a lens.

    Nice job on the walk through and explaining everything along the way. I guess I've got a long way to go from my macro of an ant I suppose.

Receive a FREE SAMPLE of our Portrait Photography Ebook

  • Guaranteed for 2 full months
  • Pay by PayPal or CreditCard
  • Instant Digital Download

Receive a FREE SAMPLE of our Portrait Photography Ebook

  • Guaranteed for 2 full months
  • Pay by PayPal or CreditCard
  • Instant Digital Download

Receive a FREE SAMPLE of our Portrait Photography Ebook

  • Guaranteed for 2 full months
  • Pay by PayPal or CreditCard
  • Instant Digital Download

Sign up to the free DPS PHOTOGRAPHY COURSE

  • Guaranteed for 2 full months
  • Pay by PayPal or CreditCard
  • Instant Digital Download

GET DAILY free tips, news and reviews via our RSS Feed

Sign up to the free

DPS PHOTOGRAPHY COURSE

  • Guaranteed for 2 full months
  • Pay by PayPal or CreditCard
  • Instant Digital Download

GET DAILY free tips, news and reviews via our RSS Feed

Sign up to the free

DPS PHOTOGRAPHY COURSE

  • Guaranteed for 2 full months
  • Pay by PayPal or CreditCard
  • Instant Digital Download
DPS NEWSLETTER
DPS NEWSLETTER
DPS NEWSLETTER

DPS offers a free weekly newsletter with: 
1. new photography tutorials and tips
2. latest photography assignments
3. photo competitions and prizes

Enter your email below to subscribe.
Email:
 
 
Get DAILY free tips, news and reviews via our RSS feed