To the extent that tips are not perfectly sharp, images produced by scanned probe microscopies (SPM) such as atomic force microscopy and scanning tunneling microscopy are only approximations of the specimen surface. Tip-induced distortions are significant whenever the specimen contains features with aspect ratios comparable to the tip's. Treatment of the tip-surface interaction as a simple geometrical exclusion allows calculation of many quantities important for SPM dimensional metrology. Algorithms for many of these are provided here, including the following: (1) calculating an image given a specimen and a tip (dilation), (2) reconstructing the specimen surface given its image and the tip (erosion), (3) reconstructing the tip shape from the image of a known "tip characterizer" (erosion again), and (4) estimating the tip shape from an image of an unknown tip characterizer (blind reconstruction). Blind reconstruction, previously demonstrated only for simulated noiseless images, is here extended to images with noise or other experimental artifacts. The main body of the paper serves as a programmer's and user's guide. It includes theoretical background for all of the algorithms, detailed discussion of some algorithmic problems of interest to programmers, and practical recommendations for users.
Keywords: algorithms; atomic force microscopy; blind reconstruction; dimensional metrology; image simulation; mathematical morphology; scanned probe microscopy; scanning tunneling microscopy; surface reconstruction; tip artifacts; tip estimation.