What is focus stacking?

From the very beginning of photography the idea of getting more depth of field in images has been a matter concern. When someone wanted to get in the same picture  the foreground and the background both in focus by normal means (small f nº, short focal length, long focus distance etc..)
 he would find it is not possible, then photographer's had the idea of taking two pictures, one of the background and one of the foreground, either in the same frame, or in two different pictures;  the concept of focus stacking was then born.

In my early days, I did some studio work myself, where three pictures would get the whole focus of a scene with great depth. Here I began to learn what it is to align pictures, because as we got closer, the image size was also increased, so I had to keep changing the enlarger height so that the three images would fit. The amount of work involved in this kind of work with film is something that can not be understood so easily nowadays, since most of the processes in the analog lab sound like methods of torture to punish the soul and something reserved for highly specialized experts.

Since the advent of digital photography,  we can say that this technique has become more popular and thus the level and variety of techniques that can be used in different fields with certain simplicity.

Already in the 80's scientific techniques were developed to get focus stacked images that otherwise would have been impossible to attain,  but that equipement was very expensive.

It was not until 2005-2006 with the boom in digital photography when focus stacking software appeared, these new techniques minimized the amount of work and equipment necessary and that is when many amateur photographers began to enjoy the benefits of focus stacking.

But what is focus stacking?. Well, it consists of taking pictures of the different depth planes that form the scene; then, either by hand (serious work) or via software, keep only the focused part of each image. As we move through different focus planes, we record detailed information of all areas; the end result will be a picture with a depth of field not possible in a single shot.

There are basically two methods of focus stacking.

-1 / Via the focus ring to get different photographs by increasing the focus distance between shots (usually start with the foreground)

-2 / By moving the complete set of camera/lens with special precision equipment.

The choice between one method or the other will depend on the magnification we are working at. Say we are working at 1:1 or below; it could be done by moving the focus ring (this limit is somewhat arbitrary based on my experience), but from this magnification up, it is essential to do so by moving the complete camera set or by moving the sample parallel to the optical axis.

For the first method there are applications that can base the movement of the focus ring depending on the focal length, the number f and the points chosen as the beginning and theend of the stack. We can also do it by eye and take more shots than necessary to ensure focus throughout the depth of the scene.

 For the second method ( the one we will use and improve on this website) we will use precision focus rails with micrometer actuators whose precision will depend on the magnification we are working at.

 There are also automated systems that coordinate the movement of the rail and the triggering of the camera; in these systems you have different stacking methods to choose from and you just have to program the number of steps or travelled distance needed.

The "stackshot" is one of such systems and can work with magnifications up to 20X (more or less). Once we pass this magnification, the stackshot rail lacks the precision needed and we are better off working with a high precision linear stage with a digital micrometer actuator (0,001mm steps) or even better with a differential micrometer actuator (Different brands available like Mitutoyo and Newport). These differential actuators give very high resolution in short travel distances (0,0005mm with 0,25mm travel, easy to get 0,00025mm half steps). When you work at high magnification in the 20-100X range we do not work with very deep subjects, as we would need to take too many pictures. With a 40/0.50 microscope lens we need 0,002mm steps; if we wanted 1mm depth of field we would need to take 500 pictures, so when working at high magnification we will look for not very deep subject features. 

 The high precision automated version requires coupling the stackshot motor to a industrial linear stage with an actuator with higher resolution than that on the stackshot rail. (some micrometer actuators trave 0,33mm/rev while the stackshot rail travels 1,59mm/rev; so they are 5 times more precise). This modification is not difficult to make for anyone good at handy work or DIY projects.

 Also for someone good at electronics it may be quite simple to build his own controller, custom programed to his needs under the Arduino platform

To sum up:
In the extreme macro stacking process, from 1:1 on and taking the f nº/magnification range into account we will get the number of steps needed via some formulas or tables.

Eg: a 5X image with the MP-E 65 mm at f4 will need 0.06 mm cuts; so if the depth needed is 1mm we have to take 17 pictures approx (1/0,06).

We will move the camera/subject to the beginning of the stack ( it is good to start a little bit before the starting point) and we will start to take pictures with 0,06mm steps, until we have the DOF needed. If we need 2mm of DOF instead of 1mm we will just take 34 pictures.
Once we have the pictures we will put them in the computer and the stacking software will align and form the final image. There are few options like combine ZP(free), Helicon focus and Zerene Stacker(our own favorite).

Print

FaLang translation system by Faboba