Focus stacking (also known as focal plane merging and z-stacking [1] or focus blending) is a digital image processing technique which combines multiple images taken at different focus distances to give a resulting image with a greater depth of field (DOF) than any of the individual source images. [2] [3] Focus stacking can be used in any situation where individual images have a very shallow depth of field; macro photography and optical microscopy are two typical examples. Focus stacking can also be useful in landscape photography.
Focus stacking offers flexibility: since it is a computational technique, images with several different depths of field can be generated in post-processing and compared for best artistic merit or scientific clarity. Focus stacking also allows generation of images physically impossible with normal imaging equipment; images with nonplanar focus regions can be generated. Alternative techniques for generating images with increased or flexible depth of field include wavefront coding, light-field cameras and tilt.
The starting point for focus stacking is a series of images captured at different focus distances; in each image different areas of the sample will be in focus. While none of these images has the sample entirely in focus they collectively contain all the data required to generate an image which has all parts of the sample in focus. In-focus regions of each image may be detected automatically, for example via edge detection or Fourier analysis, or selected manually. The in-focus patches are then blended together to generate the final image.
This processing is also called z-stacking, focal plane merging (or zedification in French). [4] [5]
Getting sufficient depth of field can be particularly challenging in macro photography, because depth of field is smaller (shallower) for objects nearer the camera, so if a small object fills the frame, it is often so close that its entire depth cannot be in focus at once. Depth of field is normally increased by stopping down aperture (using a larger f-number), but beyond a certain point, stopping down causes blurring due to diffraction, which counteracts the benefit of being in focus. It also reduces the luminosity of the image. Focus stacking allows the depth of field of images taken at the sharpest aperture to be effectively increased. The images at right illustrate the increase in DOF that can be achieved by combining multiple exposures.
The Mars Science Laboratory mission has a device called Mars Hand Lens Imager (MAHLI), which can take photos that can later be focus stacked. [6]
In microscopy, high numerical apertures are desirable to capture as much light as possible from a small sample. A high numerical aperture (equivalent to a low f-number) gives a very shallow depth of field. Higher magnification objective lenses generally have shallower depth of field; a 100× objective lens with a numerical aperture of around 1.4 has a depth of field of approximately 1 μm. When observing a sample directly, the limitations of the shallow depth of field are easy to circumvent by focusing up and down through the sample; to effectively present microscopy data of a complex 3D structure in 2D, focus stacking is a very useful technique.
Atomic resolution scanning transmission electron microscopy encounters similar difficulties, where specimen features are much larger than the depth of field. By taking a through-focal series, the depth of focus can be reconstructed to create a single image entirely in focus. [7]
Name | Primary author | Application type | Platform | License |
---|---|---|---|---|
Adobe Photoshop [8] CS4, CS5, CS6 | Adobe | Desktop | Windows, Mac OS X | Proprietary |
Affinity Photo 'Focus Merge' | Serif | Desktop | Windows, Mac OS X | Proprietary |
Aphelion with Multifocus extension | ADCIS | Desktop | Windows | Proprietary, 30-day trial |
Amira / Avizo 'Image Stack Projection' [9] | Thermo Fisher | Desktop | Windows, Mac OS X, Linux | Proprietary |
CamRanger | CamRanger | Desktop / Mobile | iOS, Android, Mac OS X, Windows | Proprietary |
Chasys Draw IES | John Paul Chacha | Desktop | Windows | Proprietary |
CombineZ | Alan Hadley | Desktop | Windows | GPL |
CUVI Vision & Imaging Library | TunaCode | Desktop / Embedded | Windows, Linux | Proprietary |
Enfuse (combined with align_image_stack or similar) | Andrew Mihal and hugin development team | Desktop | Multiplatform | GPL |
FocusFusion | DelphiTools | Desktop | Windows | Proprietary |
Focus Stacker | Alexander Boltnev, Olga Kacher | Desktop | Mac OS X | Proprietary |
Focus Stacking Online [10] | Focus Stacking Online | Web application | All | Proprietary |
Shutter Stream Product Photography Software | Iconasys | Desktop | Windows, Mac OS X | Proprietary |
Helicon Focus | Danylo Kozub | Desktop | Windows, Mac OS X | Proprietary, 30-day trial |
ImageJ with Extended Depth of Field Plugin | Alex Prudencio, Jesse Berent, Daniel Sage | Desktop | Unix, Linux, Windows, Mac OS 9 and Mac OS X | Public domain |
MacroFusion [11] | Dariusz Duma | Desktop | Linux | GPL |
Mathematica via ImageFocusCombine [12] | Wolfram Research | Desktop / Web | Windows, Mac OS X, Linux | Proprietary, 15-day trial |
Picolay | Heribert Cypionka | Desktop | Windows | Freeware |
QuickPHOTO with Deep Focus extension | Promicra | Desktop | Windows | Proprietary, 30-day trial |
Zerene Stacker | Rik Littlefield | Desktop | Windows, Mac OS X, Linux | Proprietary, 30-day trial |
The depth of field (DOF) is the distance between the nearest and the furthest objects that are in acceptably sharp focus in an image captured with a camera.
In optics, the numerical aperture (NA) of an optical system is a dimensionless number that characterizes the range of angles over which the system can accept or emit light. By incorporating index of refraction in its definition, NA has the property that it is constant for a beam as it goes from one material to another, provided there is no refractive power at the interface. The exact definition of the term varies slightly between different areas of optics. Numerical aperture is commonly used in microscopy to describe the acceptance cone of an objective, and in fiber optics, in which it describes the range of angles within which light that is incident on the fiber will be transmitted along it.
In optics, an aperture is a hole or an opening through which light travels. More specifically, the aperture and focal length of an optical system determine the cone angle of the bundle of rays that come to a focus in the image plane.
The optical microscope, also referred to as a light microscope, is a type of microscope that commonly uses visible light and a system of lenses to generate magnified images of small objects. Optical microscopes are the oldest design of microscope and were possibly invented in their present compound form in the 17th century. Basic optical microscopes can be very simple, although many complex designs aim to improve resolution and sample contrast.
In photography, bokeh is the aesthetic quality of the blur produced in out-of-focus parts of an image, caused by circles of confusion. Bokeh has also been defined as "the way the lens renders out-of-focus points of light". Differences in lens aberrations and aperture shape cause very different bokeh effects. Some lens designs blur the image in a way that is pleasing to the eye, while others produce distracting or unpleasant blurring. Photographers may deliberately use a shallow focus technique to create images with prominent out-of-focus regions, accentuating their lens's bokeh.
In optical engineering, an objective is an optical element that gathers light from an object being observed and focuses the light rays from it to produce a real image of the object. Objectives can be a single lens or mirror, or combinations of several optical elements. They are used in microscopes, binoculars, telescopes, cameras, slide projectors, CD players and many other optical instruments. Objectives are also called object lenses, object glasses, or objective glasses.
In photography, bracketing is the general technique of taking several shots of the same subject using different camera settings, typically with the aim of combining the images in postprocessing. Bracketing is useful and often recommended in situations that make it difficult to obtain a satisfactory image with a single shot, especially when a small variation in exposure parameters has a comparatively large effect on the resulting image. Given the time it takes to accomplish multiple shots, it is typically, but not always, used for static subjects. Autobracketing is a feature of many modern cameras. When set, it will automatically take several bracketed shots, rather than the photographer altering the settings by hand between each shot.
Macro photography is extreme close-up photography, usually of very small subjects and living organisms like insects, in which the size of the subject in the photograph is greater than life size . By the original definition, a macro photograph is one in which the size of the subject on the negative or image sensor is life size or greater. In some senses, however, it refers to a finished photograph of a subject that is greater than life size.
Confocal microscopy, most frequently confocal laser scanning microscopy (CLSM) or laser scanning confocal microscopy (LSCM), is an optical imaging technique for increasing optical resolution and contrast of a micrograph by means of using a spatial pinhole to block out-of-focus light in image formation. Capturing multiple two-dimensional images at different depths in a sample enables the reconstruction of three-dimensional structures within an object. This technique is used extensively in the scientific and industrial communities and typical applications are in life sciences, semiconductor inspection and materials science.
The science of photography is the use of chemistry and physics in all aspects of photography. This applies to the camera, its lenses, physical operation of the camera, electronic camera internals, and the process of developing film in order to take and develop pictures properly.
A light field camera, also known as a plenoptic camera, is a camera that captures information about the light field emanating from a scene; that is, the intensity of light in a scene, and also the precise direction that the light rays are traveling in space. This contrasts with conventional cameras, which record only light intensity at various wavelengths.
The following are common definitions related to the machine vision field.
Sports photography refers to the genre of photography that covers all types of sports.
Tilted plane photography is a method of employing focus as a descriptive, narrative or symbolic artistic device. It is distinct from the more simple uses of selective focus which highlight or emphasise a single point in an image, create an atmospheric bokeh, or miniaturise an obliquely-viewed landscape. In this method the photographer is consciously using the camera to focus on several points in the image at once while de-focussing others, thus making conceptual connections between these points.
Köhler illumination is a method of specimen illumination used for transmitted and reflected light optical microscopy. Köhler illumination acts to generate an even illumination of the sample and ensures that an image of the illumination source is not visible in the resulting image. Köhler illumination is the predominant technique for sample illumination in modern scientific light microscopy. It requires additional optical elements which are more expensive and may not be present in more basic light microscopes.
In photography, the 35 mm equivalent focal length is a measure that indicates the angle of view of a particular combination of a camera lens and film or sensor size. The term is popular because in the early years of digital photography, most photographers experienced with interchangeable lenses were most familiar with the 35 mm film format.
Optical sectioning is the process by which a suitably designed microscope can produce clear images of focal planes deep within a thick sample. This is used to reduce the need for thin sectioning using instruments such as the microtome. Many different techniques for optical sectioning are used and several microscopy techniques are specifically designed to improve the quality of optical sectioning.
Mars Hand Lens Imager (MAHLI) is one of seventeen cameras on the Curiosity rover on the Mars Science Laboratory mission.
The Pentax Q is a mirrorless interchangeable-lens camera introduced by Pentax on June 23, 2011.
The Brenizer method, sometimes referred to as bokeh panorama or bokehrama, is a photographic technique characterized by the creation of a digital image exhibiting a shallow depth of field in tandem with a wide angle of view. Created by use of panoramic stitching techniques applied to portraiture, it was popularized by photographer Ryan Brenizer.
There are a number of programs that allow you to get the equivalent of infinite depth of field in your photos, with sharp focus from the foreground all the way back to the rear. How is this possible? By taking multiple photos of the same scene and stacking them afterwards into a composite that features only the sharpest bits of each image. One of the best is Helicon Focus.