A scanning device for the confocal scanning of an object, comprising a light source, an imaging lens system for focussing the light emitted by the light source onto the object to be scanned, an image receiver for the light reflected back to the object from a point on the object and passing through the same imaging lens system, wherein the scanning device additionally comprises: - first means for changing the optical path length which are arranged in the beam path between a diaphragm arrangement and the object, wherein the first means are designed such as to change the optical distance between the image plane and the imaging lens system in the manner proposed, - second means (12, 13) for influencing the light properties during a recording period (t B1), which are designed such that light emitted by the light source and falling onto the object, and / or the light reflected back from the object and falling on the sensor can, during the recording period (t B1) of a recording, be modified in at least one property such that, during the recording period (t B1), there is a temporal relationship between the property of the light (5, 7) and the optical distance of the image plane from the imaging lens system which is predefined as a profile, - third means which are designed so as to supply for the recording period (t B1) a measured value dependent on the properties of the light of the viewing beam path, wherein a height coordinate (z s) of the object can be reconstructed from the measured value of the recording period (t B1) and a comparison value, and also - fourth means configured for determining the comparison value on the basis of a second recording with a second recording period (t B2) and a second profile for the relationship between the property of the light (5, 7) and the distance. - first means for changing the optical path length which are arranged in the beam path between a diaphragm arrangement and the object, wherein the first means are designed such as to change the optical distance between the image plane and the imaging lens system in the manner proposed, - second means (12, 13) for influencing the light properties during a recording period (t B1), which are designed such that light emitted by the light source and falling onto the object, and / or the light reflected back from the object and falling on the sensor can, during the recording period (t B1) of a recording, be modified in at least one property such that, during the recording period (t B1), there is a temporal relationship between the property of the light (5, 7) and the optical distance of the image plane from the imaging lens system which is predefined as a profile, - third means which are designed so as to supply for the recording period (t B1) a measured value dependent on the properties of the light of the viewing beam path, wherein a height coordinate (z s) of the object can be reconstructed from the measured value of the recording period (t B1) and a comparison value, and also - fourth means configured for determining the comparison value on the basis of a second recording with a second recording period (t B2) and a second profile for the relationship between the property of the light (5, 7) and the distance.