Photogrammetry & Focus-Stacking – Tips

Photogrammetry with Focus-Stacking? It can be done!

Coz of physics – the smaller an object gets, the shallower depth-of-field becomes… to the point where it becomes problematic in photography! One way to get around this is use focus-stacking – similar in principle to multiple aperture images being used to create high dynamic range photography, only instead of ‘stacking’ exposure, we layer focus and use post-processing techniques to composite our image-set into one tack-sharp image. Sounds simple but it can be painstaking work even with software and hardware tools to help you out.

In terms of capture you’ve got two basic approaches – either move camera or the focus ring. Both of these options have manual and automatic options, but my preference is to mount the camera on a software-controlled focus-rail like that supplied by Cognisys so the stack can be running while you are grabbing a well-earned coffee.

When it comes to post-production you can achieve reasonable results using Photoshop or similar but it’s way easier to employ dedicated software like Zerene Stacker or my favourite, Helicon Focus. I’m told Zerene has better tools for image cleanup, but because I’m doing Photogrammetry it’s completely impractical for me to go in and cleanup individual images. More about that later!

Face of a Yellow-headed Blow Fly, Amenia dubitalis.
Magnification 4X, focus stacked from 67 source images.
© Queensland Museum, Andy Wang & Geoff Thompson.
Dorsal view of scales on the left hindwing of Ogyris iphis iphis butterfly.
20X Mitutoyo microscope objective, focus stacked from 301 source images.
© Queensland Museum, Geoff Thompson.

Of course with photogrammetry we are not just talking about a single still image. We need lots to generate a 3D model. Let’s say we create a single composite ‘stacked’ image from (a modest) 20 separate still images. If we then want to shoot it on a turntable say, every ten degrees – that’s 20 x 36 and if we do six orientations that’s times six again = 4,320. Which is a lot of photos and that’s why I use a robot. Plus a mirrorless camera in full electronic shutter mode!

It’s a miracle it works at all to be honest, but it does… here’s a fossilized coral specimen from the QUT geoscience collection rendered into a 3D model. The model has been decimated down to 500,000 triangles and only has a single, diffuse texture plus a bit of sharpening etc in post-processing.

You can find a lot of useful information on focus-stacking and equipment at the Extreme Macro site [looks like the SSL certificate is down!] plus Allan Walls has an excellent YouTube channel with lots of video tips on this technique. But most online resources are focused on still imagery, so here’s a few thoughts I’ve put together on how to do focus-stacking for photogrammetry.

{NB: The example below uses Content-Panels as a method for adding extra content areas to this page. They can be toggled on and off using each of the ‘buttons’. An alternative option is to use additional pages for each individual sub-section and either link to them directly or add to the sidebar navigation. Which is a better option?}

Photogrammetry & Focus-Stacking – Tips