top of page
Der Klick auf dieses Deutschland-Nationalflaggensymbol führt zu einer Seite, deren Inhalt mit dieser Seite identisch ist, aber in deutscher Sprache wiedergegeben wird
This logo symbolizes with a black background and a camera outline shown with red lines behind the lettering Focus Stacking Simplified that this website conveys knowledge content that can make learning focus stacking easier

Focus stacking – endless depth of field!

Text und photos: Daniel Knop

Stacking rig Daniel Knop

Fixture for focus stacking (self-made) based on a CNC rail, equipped with manual linear stage, Novoflex Castel micro, light diffuser, height-adjustable and two-level adjustable object holder and three adjustable gooseneck flash holders

Depth of field is the big problem in macro photography, and the closer the camera gets to the subject, the more dramatically the zone of sharpness shrinks. Of course, blurring can simply be declared a creative stylistic device, but this is not everyone's cup of tea. It is better to simply increase the depth of field, as this is not difficult at all. 

 

The focus stacking technique can extend the depth of field to any size. On this website, I try to convey the basic knowledge for this in a very easy-to-understand way with numerous individual topic contributions. I am normally an author of non-fiction and specialist books, but here I am trying my hand at a digital medium: over the coming months, the blog on this site will feature further articles on topics that are important for focus stacking, like the chapters of a book, so to speak. 

 

Microscope objectives

If you want to take a magnified image of the small world, sooner or later you will end up with microscope lenses, many of which can also be attached directly to a camera. They have a much finer reproduction of detail than a normal camera lens. Discovering nature with them is fantastic. It's not just educational, it's downright addictive! But the depth of field is as thin as a sheet of paper, and nothing works without the focus stacking technique.

 

Many people shy away from this because it sounds complicated. But it's actually quite simple once you understand the basic principle. Some modern cameras can even do this automatically with macro lenses, and in a few years most cameras will probably be able to do this, even in smartphones. And it can also be automated very well with microscope lenses and then works virtually at the touch of a button.

Stacking rig Daniel Knop
Canon R3 Focus Stacking

Wing scales of a butterfly, each only a tenth of a millimeter wide – nature couldn't be more colorful!

 

 

 

HLB Planapo 20x lens, Raynox DCR150 tube lens, Canon R3 camera, electronic shutter, three Godox flash units, 250 single images, Novoflex Castel micro controller, Helicon Focus software

butterfly wing scales Focus Stacking

What is focus stacking?

Focus stacking is taking a series of pictures with a slightly shifted focus plane. Shot by shot, this focus zone is moved over the entire object so that it is slightly different for each individual photo. Special software is then used to automatically combine all the sharp details into a single image. In the case of macro photos, this can be five or ten individual images, for example, which can also be done on the move, e.g. in the garden to photograph pollinators in a flower. With microscope lenses, the number of individual shots is much higher, but the principle is the same.

Focus Stacking Novoflex Castel micro

Focus stacking with a 5:1 macro lens lens (Canon MPE 65) on a tripod – so flower blossoms are in focus from front to back

Internal camera focus stacking

Some modern cameras can also carry out focus stacking internally by shifting the focusing plane in small steps via the autofocus motor. Some call it focus bracketing or something else, but the principle is always the same: You enter how long the shooting distance should be (mostly just a number between 1 and 10) and how many individual steps are required. The length of the individual steps is then usually calculated internally by the camera. Press the shutter button and the series runs in fractions of a second. Some cameras then export the individual images, others process them internally to create a finished image with a continuous depth of field. 

double flash holder macro Daniel Knop

Selfmade double flash holder with flash diffuser, made from the shade of an IKEA ceiling light – so you can also take mobile shots with a large depth of field using internal focus stacking

The settings for internal focus stacking (here Canon R3) are simple, and good shots are achieved after a short period of practice.

Canon R3 focus bracketing

Focus stacking with microscope lens

The focus stacking technique is ideal for microscope lenses and allows you to display tiny structures so large that you could, for example, hang a photo of an iridescent blue-green housefly enlarged to two meters on the wall. Admittedly, these flies are usually not that beautiful – so let's take a 16 millimeter long weevil that is certainly a beauty: Alcidodes ocellatus. With its shiny blue-metallic body, it looks sporty on a two-meter poster, almost like an athlete with running shoes and Sunglasses, about to sprint off – believe me, I have it hanging on the wall. The intricate details and complexity of the insect's body is enormously surprising the first time you see them so large and detailed. Every hair and bristle on their body fulfills a specific purpose.

Alcidodes ocellatus focus stacking Daniel Knop

Weevil Alcidodes ocellatus, taken in focus stacking with 100 individual images, sharp from front to back and in such high resolution that the image can easily be printed with an edge length of two meters

At magnification scales of 10 x or 20 x with microscope objectives, it can easily be 150 or 200 to 300 images, sometimes even more. In this case, it is highly advisable to use a motorized system with a control unit. But there are also simple complete solutions for this. 

Stacking rig Daniel Knop

A stable base is essential for working with large image scales. A second monitor, on the other hand, is not normally necessary; the right-hand monitor facilitates object placement under visual control, while the left-hand monitor helps to operate the control unit.

Focus stacking on the microscope

However, microscope objectives can also be used for focus stacking without a special rail setup and linear stage – namely on the microscope. This makes this photographic technique highly interesting for science, as research and publications are constantly being carried out in medicine, biology and other fields, and photos are needed for this. The tiny depth of field has always been a problem with such image documents, but fantastic microscope photos with endless depth of field can now be produced with focus stacking. You can simply work manually with the fine focus knob and achieve excellent results. I even have my microscope – an Orthoplan from Leitz – equipped with a motor drive that I can program precisely via a control unit to produce fully automatic image series, as this is even more convenient and also better at high magnifications.

Routinemikroskop, an das ein Stepmotor montiert wurde, der mit einem Steuergerät verbunden ist
Stepmotor, der an den Feintrieb eines Mikroskops montiert wurde

Leitz microscope with self-built motor drive based on the stackshot control unit (Cognisys) for  automatized creation of focus stacking image series

Clematis comparison normal shot and focus stacking

Section of a botanical staining preparation (Clematis stem, cross-section, 50x, oil immersion, cropped); on the left a single image showing the shallow depth of field, on the right a focus stacking image created from numerous individual images, with depth of field over the entire image

The camera

In principle, all digital cameras are suitable for focus stacking. This is also possible with SLR cameras, but the more modern mirrorless system cameras, which work with an electronic shutter, are perfect. This not only saves us the vibration, but also the mechanical wear and tear. I myself work with a Canon R3, because it even allows me to use the electronic shutter with flash units; most other mirrorless cameras can only do this with continuous light. But that's no problem either, there are good, affordable solutions with bright LED spotlights.

 

It is important to have a computer monitor connected directly to the camera so that the live view image can be seen clearly and in great detail before the shot is taken, far better than on the small camera display. This allows the thin focal plane to be controlled very well motorized or manually. And even if a monitor is connected, there should still be a free socket for the remote shutter release. Some cameras, for example, only have a single USB socket to which you can connect either an external monitor or a remote shutter release. The remote shutter release interface is not only necessary to avoid vibrations, but also to connect a motorized control, which not only moves the camera forward in tiny steps, but also triggers it afterwards.

Stacking rig Daniel Knop

A computer monitor that is connected directly to the camera and shows the Live View image is essential for good image results

Motorized or manual?

A manual linear stage is usually the first choice for focus stacking beginners. This is actually nothing more than a macro stage, only heavier and more precise. It must be absolutely free of play so that nothing wobbles. You mount your camera on it, and after every tiny movement of the rotary handle to move the camera forward, you press the remote release – wireless or via cable. In this way, you work through the entire series, step by step, always keeping your eyes on the monitor so that you don't push the tiny depth-of-field zone too far forward. In the individual images, these zones should each overlap by around a third so that the software can assemble them better and seamlessly later.

 

However, I now only work motorized, because large series with 300 or more individual images quickly become tedious, especially if you have to repeat them several times. A good control unit remembers the start and end point of the total distance, and once you have entered the desired number of images, it automatically calculates the step size. And to repeat the whole series, e.g. with more individual shots, you simply press a few buttons and everything runs fully automated. That's how I prefer to work.

 

However, I designed my system so that there are two linear stages on top of each other, a manual one at the bottom and a motorized one above it. I use the lower one for fine adjustment, as it allows me to move the camera forwards and backwards by fractions of a millimeter. In addition, the entire camera assembly is on rails so that it can be moved forwards and backwards as a coarse adjustment. 

 

But you don't have to invest in a motorized linear stage with a control unit to get started. A simple manual linear table, such as those sold for CNC milling machines, is sufficient to start with. My manual one is an example of this. Once you have worked with it for a while and you have gained experience with a simple microscope objective with moderate magnification, e.g. 4x or 10x, you will quickly realize whether focus stacking photography is your thing or not. If so, it also makes sense to purchase a motorized linear stage with a control unit, which will allow you to carry out much more demanding work, with larger image scales and more individual images. 

linear stages motorized

Two linear stages, above model StackShot from Cognisys, which also includes an external control unit, below a stable aluminum linear stage from the CNC industry. The system shown above has been replaced by Castel micro from Novoflex, and the lower one is used as a manual linear stage (picture on the right).

linear stages motorized and manual

By placing a manual linear stage (bottom) and a motorized system (top) on top of each other, it is possible to work both manually and motorized without having to retool, and the camera position can also be fine-tuned manually at the bottom.

Flash or LEDs?

Flash units or LED light? Both solutions are possible and produce good images, but both have advantages and disadvantages. Flash units usually offer more sharpness because they freeze the slightest movements due to their short flash duration of one ten-thousandth of a second or even less. However, they usually have the disadvantage of being powered by rechargeable batteries. You can reduce the power consumption of each individual flash by using several units so that each one has to provide less light output. This is also advisable so that the light is better distributed, and you also shorten the flash firing time even further, which freezes movements even better. Nevertheless, you always struggle with battery power during long series and have to hope that they hold out and don't give up in the middle of the series. That's why I've now bought two studio flashes with a mains connection, and the battery problem is a thing of the past. I only use the battery-powered flash units when I need more light sources.

focus stacking Daniel Knop flash units

Two studio flash units with mains connection – conventional flash units can also be used, but it is much more convenient this way, especially as they are infinitely adjustable on the rotary control and even have an LED modeling light that switches off automatically during flash generation

focus stacking Daniel Knop LED

Today, studio LEDs provide sufficient light for focus stacking work with microscope objectives and their brightness is also infinitely variable

LED spotlights are usually powered from the mains, so the battery charging problem does not exist. However, when working with LED lights, I initially had great difficulty avoiding blurring; all the images were blurry and the expected crisp sharpness was completely missing. However, at that time I was still working with SLR cameras and my LEDs were too weak. I now achieve almost the same sharpness with LEDs as with flash. The so-called silent shutter release can help with some SLR cameras, because the first shutter curtain is replaced by de-energizing the sensor and switching it on when the camera is triggered, which avoids the vibration. The second shutter curtain then falls mechanically, but the exposure is already finished at the time of the shake. In this way, I was able to take quite sharp LED series. But now I work with the Canon R3, which masters anything with an electronic sensor.

 

The diffuser

An extremely important component is the diffuser, which transforms the concentrated light beam from flash units or LED spotlights into soft, diffuse light and prevents bright reflections on the subject. You can often read on the Internet that a table tennis ball, ground on both sides, should be pushed onto the microscope objective in order to diffuse the light. In practice, however, this hardly works at all, as the distance between the diffusion surface and the object is far too small at around 15 millimeters. A long distance is needed here so that the light beam can spread widely. I work with the shade of a certain IKEA lamp (model "Melodi", 28 cm diameter), which I have modified accordingly as seen in the photographs. After many attempts with table tennis balls, yoghurt pots, paper cups and other utensils, this is by far the best diffuser I have ever had. 

Stacking rig Daniel Knop diffuser
Stacking rig Daniel Knop diffuser

A good light diffuser is crucial for image quality. It can easily be made from a suitable lampshade. Here it has been fitted with a height adjustment device.

The focus stacking software

Once you have your series of images in the can, it's time for what is known in the world of film and photography as post-production: the work after the actual production of the material. You move all the images to your computer's hard disk, preferably in RAW format, i.e. not yet converted to JPG or TIF. I let my camera process all the images during the shoot directly onto the computer, because then I can already see each finished individual image on the monitor.

Focus Stacking Daniel Knop

Tethering: The individual images end up in the image archive program while they are still being taken. An alternative would be to import the entire image series from the memory card. The selected photos are then exported from here for processing in the focus stacking software

The first step in post-production for me is always to view the series to see which of the first images have sharp contours. All completely blurred images are simply deleted. Then I look for the last image in which a sharp detail can still be seen. These two images are then exported with all the files in between. For routine work, I choose the JPG format and a slight compression of around 80 percent – this is practically invisible later, even when enlarging. Only if I want to create a photo of particularly high quality, e.g. for a photo competition or for book printing, do I choose the TIF file format, which preserves a red, green and blue color separation but requires considerably more storage space. There is no image processing here, however, as I only do this on the finished image afterwards. 

The images are then dragged and dropped into the focus stacking software. You can usually set a few editing parameters there to optimize the result depending on the subject characteristics, but it is advisable to work with a basic setting, which is equally suitable for most motives, which makes things much easier at the beginning. Once the files are in the software, the process is simply started with a click. The calculation time depends on the file size and number of images as well as the computer performance. For me, it is usually only a few seconds to a maximum of half a minute, but only for larger image series in TIF format. I generally work with Apple computers, mostly with a MacBook Pro (M1), but occasionally also with the small Mac Mini (M1), which is only slightly slower when it comes to calculations. However, it works just as well with Windows computers.

Focus Stacking Daniel Knop Helicon Focus

The focus stacking software calculates the final image with a continuous focus zone (here on the right) from the individual shots (here on the left) 

I then move the resulting image from the stacking software into my image archive program. I use Capture One Pro here, but Lightroom or one of the many other programs is also suitable. Here I check the quality and enlarge the file to at least 100 %, and usually much higher, up to 400 %. I can then see whether the number of individual steps was sufficient or whether the series needs to be repeated with more and smaller steps. The control unit and object are then still on hold and I could start the next series at the touch of a button if necessary, for example with 300 instead of 200 individual photos. I know that there are complex ways of calculating the step size formula, but I like to keep things simple. 

Das Ergebnisbild der Stacking-Software schiebe ich dann in mein Bildarchivprogramm. Ich verwende hier Capture One Pro, doch auch Lightroom oder eines der vielen anderen Programme ist dafür geeignet. Hier kontrolliere ich die Qualität, vergrößere die Datei dazu auch auf mindestens 100 %, im Regelfall auch noch deutlich weiter, etwa bis 400 %. Dabei sehe ich dann, ob die Zahl der Einzelschritte ausreichend war, oder ob die Serie mit mehr und kleineren Schritten wiederholt werden muss. Steuergerät und Objekt sind dann noch in Wartestellung, und ich könnte bei Bedarf auf Knopfdruck die nächste Serie starten, etwa mit 300 statt 200 Einzelfotos. Ich weiß, dass es komplexe Wege zur Formelberechnung der Schrittgröße gibt, doch habe die Arbeit gern einfach und übersichtlich. 

Focus Stacking Daniel Knop Chrysididae
Focus Stacking Daniel Knop Chrysididae

The section of the abdomen of this 9-millimeter-long cuckoo wasp of the Chrysididae family shows fascinating colors and structural elements

All the necessary working steps and basic knowledge will be communicated in individual articles on this website's blog I am going to write in near future. The first of these are already online, and many more will follow in the coming months. 

The following text is the best one to start.

Enjoy reading and have fun on your Focus Stacking journey of discovery through the world of the small!

Clicking on this link leads to a YouTube video showing several focus stacking images of wing scales of the butterfly Chrysiridia rhipheus and other motifs created with microscope lenses, as well as a short scene showing the complete apparatus used to create these images.
Focus Stacking – was ist das?
Focus Stacking – what's that?
bottom of page