Module SPM_MORPH in SPM_MORPHGrayscale mathematical morphology library in C with application to scanned probe microscope image simulation, surface reconstruction, and tip estimation. Includes standard operations such as dilation, erosion and open. Includes a new algorithm for blind tip estimation. (J.S. Villarrubia, NIST, 1997).