A number of years ago I did a lot of Macro Photography. At that time I was using a Phase One DF+ camera with the 120mm Marco Phase One lens. It was a great set up and using focus stacking in combination with this system yielded amazing images.
Recently I received a Sony 90mm Macro lens. As with all macro lenses, you can do some great close up images but doing so means having a very shallow depth of field. Luckily in today’s digital world there is a very easy way to get a deeper depth of field with a technique called focus stacking.
Focus stacking is like doing a panorama stitch but instead of blending images together on the sides we blend the images together by placing them on top of each other. I’ll illustrate just how easy this is to do below.
Publishers Note: Focusing stacking is a technique that has been around for a long time. In leading workshops the discussion comes up a lot and I find there are many people who are aware of focus stacking but have never tried it. I hope this article with video and demo files that can be downloaded encourage those of you that have not tried focus stacking to give it a try. It’s not just reserved for close up photography but can also be used to extend depth of field in landscape photography too. Another valuable tool to have in your imaging tool box.
Taking the Photo
To accomplish a good focus stack you will need to lock your camera down so it doesn’t move during exposures. Also, you will need to make sure that all exposures are the same. I do this by setting my camera to manual and setting the f/stop and shutter speed along with ISO to yield a good exposure. I judge this for the most part by looking at the histogram.
You will also have to do manual focus during the exposures. I most often use f/4.5 – f/5.6 for the f/stop setting. While you can use any camera, I used a Sony a7 II for this article. I like this system as well as I liked the Phase One system, because there is a focus mask or as Sony calls it peaking. Peaking allows you to see the area in focus represented by a colored mask. I use Red for my mask. The Phase One backs have this feature too. Before I do the series of images for stacking I do some test shots to double check focus and judge how much overlap of the in-focus areas there should be. Like when doing a pano you want to try and have a 20-40% overlap of in-focus areas.
Prior to shooting the sequence I normally put my hand in front of the lens and take an exposure. This shows me later where I did the first exposure of the sequence. I now focus on the foreground and do my first exposure. Then I focus towards the back a very short bit and take another exposure. I make sure while doing this that I am overlapping in-focus areas. I continue to do this for the all the exposures needed to get the subject and part of the background in focus. In the example below I did 15 images. I have included these 15 files as a zip file that you can download. This will allow you to try this technique without having to go shoot a set of stacked images. Try it; it’s rather magical.
Import these images into whatever image processing software you are using and make your adjustments for color balance, contrast and such. I use Capture One for doing this. I then select all images in the sequence and copy the adjustments to each image. After that I process them out to 16bit ProPhoto RGB tiff files. You can of course use whatever setting you prefer. I set these to open up in Photoshop after processing.
You can also select the images using Bridge. Select the images in Bridge and use Open In Layers option.
Doing The Focus Stack
Now comes the first part. With all the images open in Photoshop the next step is to get all the images in layers and aligned. Simply go to the file menu and pull down to the Automate selection. Then select Photomerge. Uncheck to Blend option, then select by using all Open Files.
Photoshop now adds each image into a layer and aligns the images based on content. Once Photoshop has completed this, you get the top image in the layer and select it. Shift click on the last (bottom layer) and make sure all layers are now selected.
Now go to the Edit menu and pull down to select Auto-Blend Layers. This opens up a dialogue box. Select stack images and uncheck the check boxes. Then select OK.
In a short time you have stacked images blending the in-focus areas of each layer together. You should now have an image that shows all the areas you wanted in focus. You can look at the individual layers by clicking on the eyeball in each layer.
At this point I save a copy as is with layers in case I need to come back to it. After that I flatten the layers and save again.
It’s that simple.
You may have to do some touch up in Photoshop but for the most part you should have a nice stacked image showing greater Depth of Field than could have been achieved by stopping the lens down.
If you find some areas of the image that are not in focus or look out of place you can try to fix it by content aware and the lasso tool if it is a small area. If it is a bit larger or more complicated you can try this. Select the bottom layer and command click the eye icon to show the active layer. Select the layer mask and use a a paint brush set for white to add the part of the image that is in focus. Use a black paint brush to remove part of the layer that is out of focus and is covering an in focus part on a sub-layer. Do the same for all layers, Make sure you are only editing the layer mask and not the image layer.
There are other third party programs that will also do focus stacking. These programs do offer other options in the process. Once you get into focus stacking you’ll realize it is just not limited to doing macro work. I use it when doing landscapes when I have objects in the foreground and want to have an extended depth of field.