the resulting adaptation of the optical focus measurement system in the form of the preset value of the focus regulation system no defocusing occurs even in edge areas the reference region is selected using a method with which at the locations of repeating height marks marks that reproduce the height profile and on the basis of the basic offset offs_g the highest contrast image is determined by image processing for each location from series of images each acquired with a different default setting of the focus regulation system values for the distance between carrier plane e u2014 e and reference plane b u2014 b allocated in each case to the highest contrast image yield a height profile of the semiconductor wafer a flat region for which the height profile possesses the smallest height gradient is suitable as the reference region within the reference region an image series is in turn acquired with various default settings of the focus regulation system at at least one selected position and on the basis of the basic offset value off_g the preset value of the focus regulation system associated with the particular highest contrast image ascertained by image processing is stored as the reference setting offs_ref xi yi.