Precision Automated Focus Stacking with Stack Shot

Ever tried to photograph a subject, only to find out that you don’t have enough depth-of-field to get the whole thing in focus? Typically our first reaction is to stop down to increase our DOF. Unfortunately that doesn’t always give us the results we expect. The first issue is that even with our lens stopped down to its smallest aperture, we still may not have our subject completely in focus. The second problem is that when we stop down our aperture, we are often trading that increased DOF for decreased sharpness. This is something known as diffraction. Every lens has a sweet spot that gives us the absolute best image quality possible from that lens. But imagine if you could use that sweet spot of your lens (somewhere around f/5.6, f/8, or f/11 on most lenses) and still get the entire image in focus. This is where product, food, jewelry, and even nature photographers (macro shooters) employ a technique called focus stacking.

The technique is pretty simple; take a series of photos, each focused on a different portion of the subject, and merge them all together in postproduction to get one really sharp image. This kind of sharpness is normally not possible with just a single frame. But when we set our aperture to that sweet spot, and shoot several frames, we are able to achieve the impossible (or at least our clients will think so).

In one of my previous videos on Jewelry Photography for Catalogs, I introduced the technique using a Really Right Stuff Macro Focusing Rail. There are other manufacturers, but I like RRS products because they’re bulletproof. Basically a focus rail is a rail on which a camera mount slides forward and backward via a threaded shaft that’s turned with a knob. The movements created by turning the knob are very fine adjustments, allowing the photographer to have finite control over how much movement is being used. Basically, you back the rail all the way up, focus on the near portion of your subject, take a shot, turn the knob so the camera moves a little closer to the subject, take another shot, and repeat as many times as necessary to move through the entire subject. Sometimes it can be as many as 20–30 images depending on focal length, aperture, distance, and size of subject. Then we take all those images and dump them into software that detects the portions of each image that are sharpest, and combines them all into one really sharp image. Adobe Photoshop is capable of this, although I’ve found third-party software like Helicon Focus and Zerene Stacker to be more accurate.

Alternatively, if you don’t have a macro focus rail, you could just refocus on the subject, taking photos after each turn of the focus ring. This is not as accurate and can produce some less than optimum results due to the optics changing in the lens as you turn the focus ring, distortion of your subject, large difference in perspective, and a myriad of other problems. But, if you’re just testing the waters, it’s worth a shot.

The problem with a macro focus rail is that it doesn’t do anything to combat the biggest complication in the technique: human error. With a macro focusing rail the photographer has to physically touch the rail (which is connected to the camera) introducing the possibility of camera movement or misalignment. It also relies on the photographer’s estimate of how far to turn the knob between each shot. Using a shutter release cable and mirror lock-up will eliminate the possibility of camera shake, but you have to remember to actually use them. But the biggest problem I have with the technique is repeatability. Oftentimes, I create several versions of a subject, lighting different portions of the subject or making small changes in each image, with the intention of compositing them into one final masterpiece. This technique relies on having absolutely identical images in order for my retoucher to paint and mask the areas we went to incorporate into the final. When we aren’t focus stacking, I simply don’t touch the camera and just introduce a bounce card, additional light, prop, whatever. When focus stacking, I need to do the same thing, but it’s not just a single frame and the camera is not stationary. So, we need each stack to be identical in movement. As a human, it’s just not possible, and this is where this video comes in. A colleague of mine introduced me to a motorized focus rail called Stack Shot.

The Cognisys-Inc Stack Shot is basically a macro focus rail that has a motor and is controlled remotely. This eliminates much of the human error I talked about earlier. It allows me to get incredibly accurate, repeatable movements, over and over and over again. The video describes it pretty well, but in short, you program your starting point, stopping point, and tell the unit how many images you want to capture between those two points. The unit automatically splits up the distance into equal movements, and does all the work for you. This is completely customizable and the device is actually way more capable than what I’ve described in my video, but that’s how it works in its simplest form. One of the coolest features of the Stack Shot is the ability to connect the brain to your camera and have the unit trigger your shutter after each movement. You can even program a pause between each movement before triggering the shutter so that any vibration from the movement has stopped.

If you want to know more about my technique for focus stacking, check out my tutorial: The Complete Guide to Product Photography, Lighting, & Retouching, where I cover the subject in depth and demonstrate how to capture, use Helicon Focus, and composite multiple stacks in post.

Tony Roslund's picture

Tony Roslund is a third-generation photographer, specializing in architecture and food imagery. He is a nationally recognized member of the American Society of Media Photographers and the Association of Independent Architectural Photographers.

Log in or register to post comments
27 Comments

Or just update your Oly D EM5 m2 or EM1, it's all there for free, perhaps other brands have the focus stacking feature as well ?

Not sure what you mean. This article is about a device that moves the camera for consecutive shots which are then stacked in post. What features in the Oly are you referring to? I've owned both those cameras.

They automatically move the focus while shooting at a high frame rate (or slow if you want to use flash)

Yes, Olympus introduce and wonderful focus bracketing and stacking feature in their newest m4/3 bodies with their latest firmware update. It works wonderfully! You can either stack about 5 frames in camera or bracket up to about 99 or so and do them yourself. Granted the Stackshot is still cheaper if you don't own one of those bodies already. (or want higher MP images)

For some Panasonic models there is a workaround through an Android, app, but it's not as convenient as the Olympus solution build into the cameras.

For a moment there, I thought... wait, is that... Robin Thicke??? LOL, nike "makeover", Tony! Yes, StackShot is awesome, I've owned the system for about a year before deciding that macro didn't interest me as much as I thought it would. It was a fun process nonetheless.

p.s. really enjoy these videos, followed your tutorial on mounting and framing prints a while back and it was incredibly useful, I've been printing all my work on my own ever since, thanks!

A greater aperture is a larger one. The maximum aperture is the lens wide open. I can't believe you don't know the meanings of the words "greater" and "maximum" when it comes to photography.

Good catch. Thanks for putting it so politely. I'll make the change.

Is that the fastest that unit can go? What is the minimum travel distance? Something like that would be good in nature photography if it can shoot FAST. Critters don't hang around long or keep still except for certain conditions, and some something that can machine gun through 10 or more frames at minute focus shift distances would be ideal.

That said, I've done focus stacked product shoots using nothing more than old manual focus macro optics, 55mm and 105mm Ai Micro-Nikkors. I found I could work faster simply turning the focusing ring than using the rail I bought for the shoot! Manual focus lenses, especially manual focus macros, have very smooth focus control, making them ideal for work like this, assuming you don't want to automate of course. I use Zerene Stacker and it automatically scales and fits the images. You simply need to ensure you have focused overlap. Although I used short-duration flash, I used the self-timer on my camera to let the camera settle between frames anyway. It all went much faster than I anticipated. Below is a sample shot of a 3.5-inch product shot with the 105mm Micro-Nikkor at arounf F/8 or F/11, based on roughly 35-45 frames(!).

Obviously if repeat-ability in the studio is needed a unit like the Stack Shot is needed, but if you're doing one-offs like I've done you really need nothing more than a good manual focus lens and a program like Zerene Stacker. You don't even need a rail.

Great comments Spy. Repeatability is a key component for me. Also not touching the setup at all (especially with fine macro work on jewelry). It doesn't go much faster so critter shooting may not be ideal here. But close up flowers, webs, or whatever other nature presents it could be an asset. I've done a lot of manual focusing well before moving into a rail system. I prefer the rail personally, but the alternative can certainly work.

Yeah the automation is also ideal so you can walk away from it and deal with other issues, or just have a shot of Jack. :-)

How finite is the movement on the rail? The sample I showed you here required very subtle focus shifts to ensure I had focus overlap so Zerene could effectively stack the images. Those are huge shifts in the example.

Spy, the movements can me REALLY minimal. You'd have to ask Cognisys for specifics, or check their website for details. But it's pretty customizable.

Hi, i've seen this system about two years ago at photo expo, looks promising, but i think the limiting factor here is still software regardless of the methods. I've been focusing with the lens for the past decade almost on daily basis.

Edgar, I get great results with Helicon. What software are you using? What kind of limitations are you running into?

Hi Tony, I'm using PS, usually it edges or crossing edges(jewelry), i understand why it's happening so usually i just duplicate the "right" layer then bringing it above all layers and reveling necessary details, I've tried the Helicon a few times over the years, both programs improved over the years but had pretty much the same "issue", i'm just used to PS...

I haven't had good luck doing it in PS. I've found the third-party solutions to yield MUCH better results. Maybe give it another shot with Helicon?

Can I ask a stupid question?

The moment the camera moves, you're changing the perspective. You're not changing it a lot, but it IS changing. Doesn't that influence the final shot?

Yep, but the software is able to compensate for it. You need to make sure your shot is framed correctly at the closest distance so that when it gets to that point, you're not cropping your frame unintentionally.

Man, that warps my brain. Thanks for the explanation!

Did you have 2 microphones on you here? Your audio is phased.

Also - would have loved to see some shots that you focus stacked maybe with and without it to see how much better/faster the images looks and took to shoot and process.

Sorry if there was audio issues. I wanted to keep the video short and sweet. Really just introducing the product and expanding on the manual technique I described in a previous video. I'll leave it up to readers to decide if they want to give it a try and just the results for themselves.

Nice article, video and the Stack Shot looks like a compelling product for someone doing a lot of this.

I've done some jewelry and product photography, simply using a stable tripod; manual focus with a focus ring clamp/lever; tethered with Live View on; and stacking the resulting photos using Photoshop's import tool.

It works in a pinch... and even the clamp can be replaced by a primitive DYI rubber band and string combo ;)

Hey Tony,

Are you able to use the system in a portrait orientation? Or do all the images need to be shot landscape?

Absolutely Nick. You can shoot them in whatever orientation you need.

Hey Tony, have you had the chance to compare this method to using a tilt lens? My previous interpretation of using this technique was that it's for people who didn't want to or couldn't afford to spend the $$ on T/S lenses, but when you get into motorized systems, it seems like the cost might be comparable to a T/S lens2

Hi Adam, totally different results. A tilt/shift lens will allow you change the plane of focus but doesn't necessarily increase DOF. This technique cheats the rules for DOF by adding multiple shots together. I use TS lenses (and a view camera with my digital back) all the time, but for a different purpose. I hope that made sense?

Ah ok, thanks Tony!