An algorithm for recovering illuminant direction from the image data of a smooth Lambertian surface illuminated with a distant pointwise light source is presented. The algorithm is based on analysis of intensity distributions around structural elements of the image, such as image regions corresponding to bumps. After recognition of a bump in the image and estimation of the illuminant direction, the image data are integrated in order to recover the shape of the surface patch. The shape integration algorithm, which is based on a novel theoretical approach, is used to compute the normal vector field in the bump region without use of any explicitly given initial curve or initial data about the bump region. The theoretical consideration is illustrated with some results achieved on simulated and on realistic images. (C) 1998 Optical Society of America.