Focus stacking
   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 allo ...
technique which combines multiple images taken at different
focus Focus, or its plural form foci may refer to: Arts * Focus or Focus Festival, former name of the Adelaide Fringe arts festival in South Australia Film *''Focus'', a 1962 TV film starring James Whitmore * ''Focus'' (2001 film), a 2001 film based ...
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 dist ...
(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 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. 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 In optics and signal processing, wavefront coding refers to the use of a phase modulating element in conjunction with deconvolution to extend the depth of field of a digital imaging system such as a video camera. Wavefront coding falls under the ...
and
light-field camera 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 tr ...
s.


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, 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 dist ...
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 In photography, stopping down refers to increasing the numerical f-stop number (for example, going from 2 to 4), which decreases the size (diameter) of the aperture of a lens, resulting in reducing the amount of light entering the iris of a lens ...
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 opt ...
(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 ...
), but beyond a certain point, stopping down causes blurring due to diffraction, which counteracts the benefit of being in
focus Focus, or its plural form foci may refer to: Arts * Focus or Focus Festival, former name of the Adelaide Fringe arts festival in South Australia Film *''Focus'', a 1962 TV film starring James Whitmore * ''Focus'' (2001 film), a 2001 film based ...
. 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 investigati ...
mission has a device called
Mars Hand Lens Imager Mars Hand Lens Imager (MAHLI) is one of seventeen cameras on the ''Curiosity'' rover on the Mars Science Laboratory mission. Overview The instrument is mounted on the rover's robotic arm. It is primarily used to acquire microscopic images of ...
(MAHLI), which can take photos that can later be focus stacked.


In microscopy

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 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 ''Macrolepiota procera'', the parasol mushroom, is a basidiomycete fungus with a large, prominent fruiting body resembling a parasol. It is a fairly common species on well-drained soils. It is found solitary or in groups and fairy rings in pas ...
'', 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 ''Alluaudia comosa'' is a rare species of flowering plant. It belongs to the family Didiereaceae, subfamily Didiereoideae, which is found only in the coastal area of SW Madagascar.Rauh, W. 1983. The morphology and systematic position of the Didie ...
'', stack of 10 frames File:2013-12-28 19-51-33 Litchi-20f.jpg , Mold on ''
Litchi chinensis Lychee (US: ; UK: ; ''Litchi chinensis''; ) is a monotypic taxon and the sole member in the genus ''Litchi'' in the soapberry family, ''Sapindaceae''. It is a tropical tree native to Southeast and Southwest China (the Guangdong, Fujian, Yun ...
'', 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 Epsilon photography is a form of computational photography wherein multiple images are captured with slightly varying camera parameters (each image varying the parameter by a small amount ''ε'', hence the name) such as aperture, exposure, focus, ...
* Focus bracketing *
Frazier lens The Frazier lens is a special camera lens designed by Australian photographer Jim Frazier (inventor), 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 ...
*
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 m ...
(HDR) * Image stitching *
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