User:Franz van Duns/Focus Stacking
I started off with focus stacking sometime in 2012 with trial versions both of Zerene Stacker and Helicon Focus. My main aim was to extend the depth of field in many photographical situations to a far greater extent than simply setting the aperture to minimum diameter, e.g. ap=22, would ever allow. This applies mainly to macro and micro photography.
Refer to this Wiki Commons article which explains some of the details which apply to successful macro and micro photography: Commons:Macro. Refer to this Wikipedia article which provides a general explanation of focus stacking methods, including links to sites which provide greater detail : Focus stacking
My intention is to provide an overview of the various aspects one must pay attention to in order to assure that the individual images of the focus stack are of the best possible quality. All information in the following is based on my personal experience on the subject, and I freely admit that each and every step may be achieved by many other means, depending both on your photographical hardware and software and your personal experience.
!! WORK IN PROGRESS !!
A typical focus stack is based on any number of individual images, ranging from 2 to several hundred. My maximum so far has been 101 images in one focus stack, depicting moss and lichens on the the top of a heavily weathered wooden pole, covering a depth of field of approximately 100mm.
Set aperture to ap=13 or ap=11.
The optimum aperture for my camera/lens setup is normally ap=8 or ap=11. I usually set the aperture to ap=13 because this gives enough depth overlap when I do make a slight maladjustment when manually moving the focus ring to the position for the following image.
Set shutter speed shorter than 1/20 second.
Shutter speed ideally shorter than 1/20 second, depending on the stiffness of the basis. 1/10th or 1/5th second are sometimes feasable. Slower speeds almost always lead to a slight jitter in a few stack images which noticeably impairs the quality of the final stacked image. On close scrutinising one can detect "blur rings" at the depth corresponding to the impaired source images. I always try to evade. Otherwise either raise the ISO value, improve the illumination or reduce the bias value on the camera body.
!! WORK IN PROGRESS !! Main illumination by indirect sunlight from the window to the left and a styrofoam reflector close to the right. The centre was illuminated from the right by a 6 watt LED spotlight. As the sky was disappointingly drab, a sheet of light blue tinted copy paper had to serve as a neutral background for the white petals.
Tripod / Absolutely Stable BasisEdit
A sturdy tripod is an absolute necessity. Weight counts! I use a nigh 40-years old steel Gitzo traveller that weighs 3,5 kilogrammes with a sturdy Gitzo 3-way pan/tilt/rotate head. But due to residual camera shake (full focus format with 42 MPixels, i.e. a pixel pitch of approx. 4,5 micrometres, and a 90mm macro lens) this will only suffice for focus stacks down to a magnification of 1:10. Any further magnification and blurring will surely occur.
For higher magnifications (1:5) or more the whole camera/lens setup must be placed on an even sturdier basis. Note: insert image of equipment!. I regularly use blocks of chipboard or similarly rigid materials, sometimes a stool as basis to attain the necessary height.
Subject must not moveEdit
If any important detail is too bright, simply turn down the bias to -1 ap, -2 ap, or even -3 ap before making an image. Just adapt the bias until even the brightest spots are not overexposed. Tip: switch on "zebra striping" within camera to see overexposed highlights, I set the limit to 95%. The JPGs are, of course, too dark, but the RAW files still have enough dynamic reserves in the shades to fully make up for the missing light quanta. This requires "developing" the RAW files via a RAW converter such as Adobe Lightroom, Adobe Camera Raw or any other RAW conversion software that accepts the RAW file format your camera exports.
Three Methods to Incrementally Move Focus Between ImagesEdit
(A) My method: manually increase the focus length by incremental steps, starting off with the nearest detail of the object, then moving incrementally outward to the most distant detail that is to be included in the focus stack. I advise taking at least two pictures nearer than the nearest detail and at least two further that the most distant detail, just in case you misjudged distances or in case you moved the camera/lens combination ever so slightly after having made all arrangemnets.
(B) Alternative manual method: place camera/lens combination on a rail and move forward in small increments.
(C) Automate Transistion between Focus Planes: If you have the cash - and the right brand of camera (modern versions of Canon or Nikon bodies) - you can hand the process of imaging to specialized software with which you can control your camera or even to specialized hardware you insert between body and lens(see Helicon Focus). No outlook for anything similar yet for Sony cameras, so it's down to the manual grunt work.
Manually Increasing Focus Length Between ImagesEdit
My method: after an image has been taken manually rotate the focus ring of the macro lens by approximately 0.5 mm by means of a custom-made narrow millimetre scale attached to the lens curvature before making the next image. Your lens may require a different turn between images, either larger or even tinier (even the above described 0.5 mm step is quite difficult to set reliably) or by setting a different aperture value, e.g ap=8.
Preparing the Images for Focus StackingEdit
For this step I use Adobe Lightroom, but any other image handling tool that can work with 48-bit (3x 16-bit RGB) images will suffice. All images are identically processed by one of my individually defined Adobe Lightroom presets before being handed over to the focus stacking software.
Of course, one can make do with 8-bit JPG images, but any more than minimal processing following the creation of the focus stack will lead to deficiencies in the image such as colour banding which is noticeable especially in areas displaying slight colour transitions, e.g. in the sky.
Using the Focus Stacking SoftwareEdit
I have purchased Zerene Stacker, but many other software tools will attain similar results.
The built-in procedure is basically: (a) automatically arrange every image to fit in line with either the first image (my preference) or with the image's immediate predecessor, (b) inspect every pixel of every image as to which of the series of images shows most local detail, i.e. more local contrast, in respect to all others, (c) mask off all the areas with less than optimum detail, missing no pixel, (d) take the areas with most details from each image and stuff these into the final image , again without missing a pixel, (e) Display result.
Mandatory spot removal on the completed focus stack via Adobe Photoshop. Finally crop to required size if necessary.
Worm tracks: Due to the fact that the image size varies within the focus stack sequence, a speck on the sensor will appear a little nearer towards the edge of the image than the previous image
Focus stacking is manageable but requires great care in all aspects necessary to create a clean series of images for further processing.