Introduction: Focus Stacking
Learning how to focus stack is an important technique for every macro or micro photographer. Focus stacking is a post production method that allows you to combine many different images shot at different focal planes to make one crisp focused image. This is useful because (typically) the larger the magnification of your lens, the shallower of a focal plane you have to work with. It is unsurprising that a typical application of this technique is microphotography where it is often impossible to get all of your subject in focus at once. Using this approach, you can stitch multiple slightly blurry images together to get one crisp image.
Supplies
This tutorial uses Photoshop.
(Note that some of the links on this page are affiliate links. This does not change the cost of the item for you. I reinvest whatever proceeds I receive into making new projects.)
Step 1: Shooting
The first step before you can focus stack your images is to shoot your images. Using an adjustable bellows setup or macro rail, take a series of photos starting with your subject slightly out of focus. Slowly and incrementally increase the focal plane until your subject comes into and, once again, just out of focus. The goal is to get as much of the subject into focus as you can.
In an ideal world you would have a motorized macro rail which increments your camera at fixed intervals. However, these cost hundreds, if not thousands, of dollars. Doing it by eye should work for most intents and purposes.
To learn more about shooting microphotography photos, check out my DLSR Microphotography instructable.
Step 2: Load the Image Sequence
The first step is to load the image sequence into Photoshop as a series of layers.
On the top app menu, navigate to File --> Scripts --> Load Files into Stack...
A new window titled "Load Layers" should open. Click on the Browse... button and locate your image sequence. Select all of the images and click open.
Finally, make sure that none of the check boxes on the bottom are selected, and click OK on the top right.
Step 3: Align the Layers
Select all of the layers from the Layers menu.
On the top app menu, navigate to Edit --> Auto-Align Layers...
When the new window opens make sure that only Auto is selected, and then click OK.
Step 4: Blend the Layers
Now is time to blend all of the layers together into one image.
On the top app menu, navigate to Edit --> Auto-Blend Layers...
When the new window opens make sure that Stack Images is selected and the checkbox on the bottom that says Seamless Tones and Colors. Finally, click OK to blend the layers together.
Step 5: Flatten the Image
The next step is to flatten all of the layers by going to Layer --> Flatten Image. This will remove the transparent background and combine the entire image stack into one image.
Step 6: Crop the Image
After aligning and blending the layers, the center of the image is typically the most in focus. Also, there is often transparent or "empty" space around the outside borders of the image due to slight inconsistencies in alignment.
Tighten in upon the center of the image by using the Crop Tool to remove any empty or excessively blurry space around the borders of the image.
Step 7: Color Correction
Once the image is cropped, it is time to color correct the image to your liking.
Typically, I only adjust the levels and the curves of the image. Sometimes I will slightly tweak the hue and saturation if I feel that it is off.
Step 8: Practice
The last step is the most important, and that is to keep practicing.
Even after doing this dozens of times, I'm hardly an expert at this process. Like any other skill, the only way to truly learn it is to keep doing it.
I wish you the best of luck, and hope you have some fun!

Did you find this useful, fun, or entertaining?
Follow @madeineuphoria to see my latest projects.
8 Comments
4 years ago
DVD players have their laser on a sled, that can move the laser in small amounts. This sled be used to hold the bug or other object, with the gears manipulated to move it in small amounts forward or back.
Tip 4 years ago on Step 1
For really high quality results, I find I have to make the focus increment very small. On my camera there is a "focus peaking" option that highlights the areas in focus. I use this to increment the focus so that the new area in focus overlaps with the old. I have sometimes ended up with a stack of over 50 images. In order to stack these properly in Photoshop you need to divide them into subsets of about 4-5 each. Blend those, and then blend the results of those in the same way. See for example, https://www.flickr.com/photos/stephenschiller/37210733816/in/dateposted-public/
Reply 4 years ago
Woah. That's really nice results. Super-crisp. Thanks for sharing your tip.
5 years ago
Hint: Step 8 has a tiny type-o in it, should be Practice, not Practive. Might want to fix it. :)
Reply 5 years ago
Updated. Thanks.
5 years ago
IIRC some of the Olympus OMD cameras do part and/or all of this process in camera. But it good to know that there is a manual work around.
5 years ago
I also do stacks by area, then edit all together and get everything in focus. Is more work, and you have to be more carefull, especially with the lighting, but you can do prety amazing stuff. I got an ant in the microscope, at 450x all in focus.
Reply 5 years ago
Oh cool. 450X is fairly impressive.
I should give that a try. There have been a few image sequences that this process has not worked well with.
Do you have a picture of that?