Shape from focus

The functionality described in the section below is available as part of the batch stitching tool in the DM-Gold application since version 1.0.13.18

Shape from focus (SFF) is a method in computer vision of 3D reconstruction, which consists in using information about the focus of the optical system to build a 3D surface of the observed object.

The DM-Gold application, starting from version 1.0.13.18, provides the ability to build stitched 3D surface models using the SFF method for objects scanned in batch mode.

If 3D option is checked for the selected pattern - after scanning finish the result 3D model will be saved with “.osgb” extension by the same path as all scanned images.

For the method to work correctly, it is required to analyze several frames taken in different focus positions. To do this, you need to perform focus scanning (stacking), so it is highly recommended to also activate the S checkbox.

Starting from the DM-Gold version 1.1.12.33, to use this option for the selected pattern, you need to activate the corresponding SFF checkbox:

Photometric stereo

The functionality described in the section below is available as part of the batch stitching tool in the DM-Gold application since version 1.1.12.33

Photometric stereo (PS) is a technique in computer vision for estimating the surface normals of observed object under different lighting conditions (light sources from different angles). The resulting normal map can be used for 3D reconstruction of the object surface.

The DM-Gold application, starting from version 1.1.12.33, provides the ability to build and refine surface of stitched 3D models using the PS technique for objects scanned in batch mode.

To use this option for a selected scan pattern, activate the corresponding PS checkbox:

You can use the SFF and PS options at the same time, in this case, the surface of the object will be built using shape from focus, and then refined using photometric stereo.

In the case of scanning flat or almost flat objects, it is enough to select only the PS option.

For this method, you do not need to do stacking. This will allow you to get the results faster. For example, for the last of the following examples (part of a banknote), in the SFF+PS mode, the model was scanned and built for 7 min. 40 sec. (3 min. 18 sec. for scanning + 4 min. 22 sec. for building the 3D model). And in PS only mode, the same example was obtained in 5 min. and 18 sec. (26 sec. for scanning + 4 min. and 52 sec. for building the 3D model). Thus, the result was obtained 2 min. 22 sec. faster (more than 30% faster), although the results were very similar.

Comparative examples

There are some examples below to compare the work of SFF, SFF+PS and PS (only for flat object):

Scanned patternNormal mapSFF surface 3D modelSFF+PS surface 3D modelPS surface 3D model






This mode is not suitable because the scanned object surface is not flat!






This mode is not suitable because the scanned object surface is not flat!



  • No labels