1. A method for determining an apparent distance between an object and a surface, the method comprising: illuminating the object with a spatially inhomogeneous irradiance from the surface, an intensity variation in the spatially inhomogeneous irradiance in a plane parallel to the surface responsive to a distance between the plane and the surface; acquiring an image of the object while the object is illuminated by the spatially inhomogeneous irradiance; and determining the apparent distance based on a brightness contrast in the image of the object due to the spatially inhomogeneous irradiance.