Depth calculation of an object allows computer reconstruction of the surface of the object in three dimensions. Such information provides human operators 3D measurements for visualization, diagnostic and manipulation. It can also provide the necessary coordinates for semi or fully automated operations. This paper describes a microscopic imaging system with computer vision algorithms that can obtain the depth information by making use of the shallow depth of field of microscopic lenses.
"Image cancellation approach to depth-from-focus", Proc. SPIE 2348, Imaging and Illumination for Metrology and Inspection, (6 January 1994); doi: 10.1117/12.198850; https://doi.org/10.1117/12.198850