An overview of shape-from-shading
Helmut Cantzler

Shape from shading uses the pattern of shading in a single image to infer the shape of the surface in view. A typical example of shape from shading is astronomy, where the technique is used to reconstruct the surface of a planet from photographs acquired by a spacecraft.

The reason that shape can be reconstructed from shading is the link between image intensity and surface slope. The radiance at an image point can be calculated with the surface normal, the direction of the illumination (pointing towards the light source) and the albedo of the surface, which is typical of the surface's material. After calculating the radiance for each point we get the reflectance map of the image.

The parameter of the reflectance map might be unknown. In this case we have to estimate the albedo and illuminant direction. Albedo and illuminant can be computed, by assuming we are looking at a lambertian surface, with help of the averages of the image brightness and its derivatives. From the reflection map and by assuming local surface smoothness, we can estimate local surface normals, which can be integrated to give local surface shape.