Depth is inferred by tracking which regions become sharp as the focal plane shifts through the image stack. A surface that reaches peak sharpness at one focus setting is associated with the corresponding depth position. Repeating this comparison across regions produces a depth map, allowing the reconstruction to represent spatial variation that is not directly visible in any single photograph.
Changing the focal plane creates a sequence in which different scene regions become sharply resolved while others lose detail through blur. This variation supplies the contrast needed for computational comparison. Without focus changes, the algorithm would have fewer observations for deciding which image contains the most useful detail at each location, weakening both depth estimation and image fusion.
The reconstruction process evaluates focus patterns across the stack and selects or combines the sharpest information for different image regions. These contributions are fused into one image rather than preserving the blur associated with a single focal setting. The result can display fine detail across a larger depth range, which is useful when no individual photograph is sharp everywhere.
It is especially valuable when the scene contains substantial depth variation and a single image cannot keep both near and distant regions sharply detailed. The stack supplies multiple focus observations, while the depth map adds spatial information for analysis. Consequently, engineers can obtain improved visualization and quantitative measurements from scenes whose extended depth cannot be represented clearly in one frame.
First, capture multiple photographs while changing the focus setting so that different scene regions become sharp across the stack. Next, compare the focus patterns to estimate a depth map. Finally, fuse the sharpest information from the photographs to create an all-in-focus result. The same reconstructed data can support visualization or quantitative analysis, depending on the engineering task.
Engineering applications include three-dimensional measurement, machine vision, microscopy, and inspection of objects with substantial depth variation. In these settings, the reconstructed depth map can support spatial measurement, while the fused image improves visibility of details across the scene. The method is therefore relevant both to systems that analyze geometry and to workflows that require clearer inspection imagery.
Two principal outputs are an estimated depth map and an all-in-focus image. The depth map describes how scene regions are positioned through the focus sequence, supporting three-dimensional measurement and quantitative analysis. The fused image presents sharp information across the available depth range, supporting visualization, machine vision, microscopy, and inspection when depth-dependent blur would otherwise obscure details.