We all love the shallow depth-of-field and blurred out backgrounds in food photography. However, there are times when we need our entire subject to be sharp, such as when we are shooting a product or a spread of food. Focus stacking is the ultimate way to get the sharpest images. It’s a crucial technique to know for food and still life photography.
This is a post-production technique that involves blending several images with different focus points to create one image that is sharp and in focus.
Your aperture, focal length, and distance from your subject all play a part in the sharpness of your final image. When you’re shooting up close, you can’t get a lot in focus. Simply stopping down to a smaller aperture (higher F-stop number) won’t help you get a sharper image.
The reason for this is lens diffraction.
Lens diffraction is a phenomenon of optical physics. Basically, diffraction occurs when light interacts with an object. We see diffraction all the time in our daily life. For example when we see light hit water droplets, or a spider web.
Diffraction also occurs in our lens and on our camera sensor. When the aperture is wide (lower f-stop number), say anywhere from f1.4 to f8, there is a lot of light hitting the camera sensor directly.
When you stop down to apertures such as f22, the light hits and bounces off the edge of the aperture blade. This causes the light to hit the subject less precisely and the image will be a bit muddy and less sharp.
It doesn’t matter how good your lens is, your images will grow less sharp at apertures over f16 due to a law of physics. As you stop down, the fine details in your image will begin to blur out.
Here is an image of some pink fabric flowers that I shot with my Canon 100mm macro lens. At f5.6, you can see that the image quality is good and that the image has a smooth and refined look.
Note that not all the petals are in focus.
Now compare this image of the same shot at f22. The image isn’t sharp and it looks a bit grainy. Notice also that the background isn’t as blurred out, due to the increase in the depth of field.
As you can see, stopping down in aperture provided a bit more focus, but it degraded the quality of the image.
Depth of Field
Getting sufficient depth of field can be particularly challenging in food and still life photography. We tend to shoot with the camera relatively close to our subject. And depth of field is smaller (shallower) for objects closer to the camera.
If a small object fills the frame, it’s often so close that its entire depth cannot be in focus at once.
Depth of field is normally increased by stopping down in aperture (using a larger f-stop number), but beyond a certain point, lens diffraction will counteract the benefit of the image being focus. It also reduces the brightness of the image.
Focus stacking allows you to increase the depth of field of images taken at the sharpest aperture.
If you’re using a macro lens such as the 100mm or 110mm, both popular lenses for still life and food photography, you’ll most benefit from using focus stacking, as macro lenses have a very shallow depth of field.
This is awesome for creating those blurred out backgrounds, but not so great at those stopped down apertures.
In my shot of the flowers, I wanted the petals to be in focus. I took a few images with varying focus points. In some images, the bottom petals were sharp but the top petals were soft. In others, the petals in the middle looked soft.
You don’t need to take a lot of images unless you are doing macro photography. In most cases, three images will do.
What You Need For Focus Stacking
In order to get the correct results in post-processing, you need to know how to shoot specifically for focus stacking.
A sturdy tripod is a must. Your subject must be in exactly the same position from image to image in order for them to be blended together in Photoshop.
A shutter release to activate the shutter can also be useful. If you’re shooting tethered from Lightroom, you can also activate the shutter from within the program.
Pressing the shutter by hand can cause a slight vibration that may introduce some camera shake into the image. This will cause your images to not be perfectly aligned with one another, although Photoshop is pretty good at aligning layers that are slightly off.
Photoshop is usually the post-processing program of choice but there is other focus stacking software out there, like Helicon or Focus Stacker, which is specifically for Mac OS.
How to Shoot For Focus Stacking
- Frame the subject and compose the shot.
- Determine your exposure. Use the manual mode on your camera to ensure that your exposure is consistent from image to image.
- Choose a point on your subject to focus on and take the first exposure.
- Without moving the camera or adjusting any settings, choose a different point on your subject to focus on and take the next exposure.
- Repeat this process several times so you have several images with as many focus points as needed to cover every aspect of the subject’s DOF. This will vary, depending on your subject.
Processing the Final Image
- Export your images into a separate folder that you can easily navigate to.
- Open Photoshop. Go to File and choose Scripts.
- Choose Load Files into Stack.
- Click Browse and select all the images.
- Check the box for Attempts to Automatically Align Source Images.
- Click OK and each of the images will open into a new layer in Photoshop.
- Hold down shift and click on the top layer to highlight all the layers.
- Under Edit, select Auto-Blend Layers.
- Check the box for Stack Images and also for Seamless Tones and Colors. Do not check Content Aware. Click OK
- If you’ve uploaded a lot of images, flatten the final image by selecting Layer and then Flatten Image and save. This reduces all the files into one background layer and reduces file size.
- Save your image.
Here is the final image. You can see the various petals are sharper.
Focus stacking is necessary in some types of still life photography, such as product imagery. But it can also be very useful when shooting still life or food.
If you’re shooting a spread of food or a dish where you want the whole surface from front to back to be in focus, it’s a great technique to use.
It’s a lot easier than you might think, and it gives good results. So give it a try!
If you’re looking for more tips to improve your photography check out our post on photo retouching or lifestyle photography tips and keep experimenting!
A note from Josh, ExpertPhotography's Photographer-In-Chief:
Thank you for reading...
if you want to capture breathtaking images, without the frustration of a complicated camera.
It's my training video that will walk you how to use your camera's functions in just 10 minutes - for free!
I also offer video courses and ebooks covering the following subjects:
You could be just a few days away from finally understanding how to use your camera to take great photos!
Thanks again for reading our articles!