A probe-based surface characterization or metrology instrument such as a scanning probe microscope (SPM) or a profilometer is controlled to account for errors in the vertical positioning of its probe and errors in detecting the vertical position of its probe while scanning over relatively large lateral distances. Accounting for these errors significantly improves the measurement of vertical dimensions. These errors are accounted for by subtracting reference scan data acquired from the scanned sample from measurement scan data. The measurement scan data is obtained from an area that includes the feature of interest as well as a portion of a reference area which is preferably located near to the feature of interest and which is preferably featureless. The reference scan data is obtained from an area that includes the reference area and that preferably excludes the features of interest. Subtracting the reference such data from the measurement scan data obtains corrected measurement scan data that accounts for scanning errors and for errors in detecting the probe idiosyncrasies. In order to facilitate process automation, the features of interest can be identified automatically or semi-automatically by operating the instrument in a feature-locating mode to identify distinguishing characteristics of the features of interest such as differences in magnetic or electrical properties between the features of interest and the adjacent features. This procedure is particularly wellsuited for measuring pole tip recession in a magnetic head.