HOME

TheInfoList



OR:

Focus stacking (also known as focal plane merging and z-stacking or focus blending) is a
digital image processing Digital image processing is the use of a digital computer to process digital images through an algorithm. As a subcategory or field of digital signal processing, digital image processing has many advantages over analog image processing. It all ...
technique which combines multiple images taken at different focus distances to give a resulting image with a greater
depth of field 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. Factors affecting depth of field For cameras that can only focus on one object dis ...
(DOF) than any of the individual source images. Focus stacking can be used in any situation where individual images have a very shallow depth of field;
macro photography Macro photography (or photomacrography or macrography, and sometimes macrophotography) 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 grea ...
and
optical microscopy Optics is the branch of physics that studies the behaviour and properties of light, including its interactions with matter and the construction of instruments that use or detect it. Optics usually describes the behaviour of visible, ultravio ...
are two typical examples. Focus stacking can also be useful in
landscape photography Landscape photography shows the spaces within the world, sometimes vast and unending, but other times microscopic. Landscape photographs typically capture the presence of nature but can also focus on man-made features or disturbances of landscapes ...
. 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 and light-field cameras.


Technique

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 Edge detection includes a variety of mathematical methods that aim at identifying edges, curves in a digital image at which the image brightness changes sharply or, more formally, has discontinuities. The same problem of finding discontinuitie ...
or
Fourier analysis In mathematics, Fourier analysis () is the study of the way general functions may be represented or approximated by sums of simpler trigonometric functions. Fourier analysis grew from the study of Fourier series, and is named after Joseph ...
, 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).


In photography

Getting sufficient
depth of field 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. Factors affecting depth of field For cameras that can only focus on one object dis ...
can be particularly challenging in
macro photography Macro photography (or photomacrography or macrography, and sometimes macrophotography) 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 grea ...
, 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 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 a bundle of rays that come to a focus in the image plane. An op ...
(using a larger
f-number In optics, the f-number of an optical system such as a camera lens is the ratio of the system's focal length to the diameter of the entrance pupil ("clear aperture").Smith, Warren ''Modern Optical Engineering'', 4th Ed., 2007 McGraw-Hill Pro ...
), 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 Mars Science Laboratory (MSL) is a robotic space probe mission to Mars launched by NASA on November 26, 2011, which successfully landed '' Curiosity'', a Mars rover, in Gale Crater on August 6, 2012. The overall objectives include investiga ...
mission has a device called Mars Hand Lens Imager (MAHLI), which can take photos that can later be focus stacked.


In microscopy

In
microscopy Microscopy is the technical field of using microscopes to view objects and areas of objects that cannot be seen with the naked eye (objects that are not within the resolution range of the normal eye). There are three well-known branches of mic ...
, high
numerical aperture 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 propert ...
s 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 lens In optical engineering, the objective is the optical element that gathers light from the object being observed and focuses the light rays to produce a real image. Objectives can be a single lens or mirror, or combinations of several optical elem ...
es generally have shallower depth of field; a 100×
objective lens In optical engineering, the objective is the optical element that gathers light from the object being observed and focuses the light rays to produce a real image. Objectives can be a single lens or mirror, or combinations of several optical elem ...
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 A scanning transmission electron microscope (STEM) is a type of transmission electron microscope (TEM). Pronunciation is tɛmor �sti:i:ɛm As with a conventional transmission electron microscope (CTEM), images are formed by electrons passing ...
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.


Software / Application


Gallery


Pictures

File:Zassenhaus pepper mill - underside view - grinder (2019-08-06).jpg , Pepper mill, stack of 28 frames File:Electric guide 3×2.5 mm.jpg , Stacked image of 3 × 2.5 mm electric wires File:Philips Series 7000 shaver head.jpg , Shaver head, stack of 36 frames, retouched File:Macrolepiota procera Parasol -20191014-RM-165319.jpg , '' Macrolepiota procera'', stack of 15 frames File:Orchideenblüte 2019-05-22 11-34-28 (C)-PSD.jpg , Stacked image of the inner ridge of an orchid blossom File:Two Arecaceae in the fields viewed through a hole in a tree trunk in Laos at golden hour.jpg , Stacked image of two ''Arecaceae'' viewed through a hole in a tree trunk File:2013-06-07 14-57-13-bille-32f.JPG , Pellet, stack of 32 frames File:2016-01-06 14-51-04 parc-tete-or 10f.jpg , '' Alluaudia comosa'', stack of 10 frames File:2013-12-28 19-51-33 Litchi-20f.jpg , Mold on '' Litchi chinensis'', stack of 20 frames File:Skull (front) - Dolmen de Marie Gaillard MHNT ANT 2017 0 54.jpg , Skull, stack of 6 frames File:Sympetrum flaveolum male - Kulna.jpg, Sympetrum flaveolum male, stack of 36 frames


Videos

File:Hindesite - Lily - Focus Stacking (by).ogv, Video example of how focus stacking is applied to images File:Focus stacking NEC USB chip imgp0017 wp.ogv


Diagrams

File:Stack and Stitch Illustration.png , Software creates from the sharpest areas in a stack of sections.


See also

* Brenizer Method *
Deep focus Deep focus is a photographic and cinematographic technique using a large depth of field. Depth of field is the front-to-back range of focus in an image, or how much of it appears sharp and clear. In deep focus, the foreground, middle ground, and ...
* Epsilon photography * Focus bracketing *
Frazier lens The Frazier lens is a special camera lens designed by Australian photographer Jim Frazier. The Frazier lens provides an appearance of a massive depth of field, allowing the foreground and background of an image to be in focus. Frazier's lens ...
*
High dynamic range imaging In photography and videography, multi-exposure HDR capture is a technique that creates extended or high dynamic range (HDR) images by taking and combining multiple exposures of the same subject matter at different exposure levels. Combining mu ...
(HDR) *
Image stitching Image stitching or photo stitching is the process of combining multiple photographic images with overlapping fields of view to produce a segmented panorama or high-resolution image. Commonly performed through the use of computer software, most a ...
*
Image fusion The image fusion process is defined as gathering all the important information from multiple images, and their inclusion into fewer images, usually a single one. This single image is more informative and accurate than any single source image, and i ...
* Microscopy#Deconvolution *
Shift-and-add Speckle imaging describes a range of high-resolution astronomical imaging techniques based on the analysis of large numbers of short exposures that freeze the variation of atmospheric turbulence. They can be divided into the shift-and-add ("' ...
for stacking astrophotos


References

* Ray, Sidney. 2002. ''Applied Photographic Optics''. 3rd ed. Oxford: Focal Press. .


External links


Which cameras have built-in focus stacking?
Nov. 2019. * {{commons category-inline, Focus stacking Articles containing video clips Image processing Photographic techniques