One of the greatest difficulties when taking pictures with high magnification is the very shallow depth of field. Only a wafer-thin area, a few tenths of a millimeter deep, is in focus. Suitable lighting with a flash and diffuser makes it possible to work with a smaller aperture, but this is not a real solution, since if the aperture is too small, the so-called lens diffraction blur occurs and affects the entire image.
The magic formula is "focus stacking", which can be translated as "focus area expansion". A series of images is recorded, each time shifting the camera or the subject by a fraction of a millimeter, so that in the ideal case, slightly overlapping areas are in focus. With suitable software such as Photoshop, Zerene, Helicon or others, the individual images are now aligned with one another and then blended in such a way that the individual areas of focus are combined into one image.
Some modern flagship cameras offer focus bracketing which allows to take the photo series automatically and process the data with the camera intern software.
The individual images are stacked and aligned with one another to compensate for movement between the shots.
When taking a series of photos of living animals in nature, there is often a relatively large amount of movement between the individual images, which often makes automatic processing impossible. In such cases, the entire work process has to be carried out manually, which can often take several hours. In any case, correction work is always required to eliminate so-called ghosting and inaccuracies.