Journal of Mathematical Imaging and Vision 14: 237–244, 2001 c 2001 Kluwer Academic Publishers. Manufactured in The Netherlands. Optimal Algorithm for Shape from Shading and Path Planning RON KIMMEL Department of Computer Science, Technion, Israel Institute of Technology, Haifa 32000, Israel ron@cs.technion.ac.il JAMES A. SETHIAN Department of Mathematics and Lawrence Berkeley National Laboratory, University of California, Berkeley, CA 94720, USA sethian@math.berkeley.edu Abstract. An optimal algorithm for the reconstruction of a surface from its shading image is presented. The algorithm solves the 3D reconstruction from a single shading image problem. The shading image is treated as a penalty function and the height of the reconstructed surface is a weighted distance. A consistent numerical scheme based on Sethian’s fast marching method is used to compute the reconstructed surface. The surface is a viscosity solution of an Eikonal equation for the vertical light source case. For the oblique light source case, the reconstructed surface is the viscosity solution to a different partial differential equation. A modification of the fast marching method yields a numerically consistent, computationally optimal, and practically fast algorithm for the classical shape from shading problem. Next, the fast marching method coupled with a back tracking via gradient descent along the reconstructed surface is shown to solve the path planning problem in robot navigation. Keywords: fast marching, Eikonal equations, shape from shading, navigation 1. Introduction One of the earliest problems in the field of computer vision is the reconstruction of a three dimensional ob- ject from its single gray level image. The problem, for the case of a diffusive reflectance model of the surface, also known as Lambertian reflectance, is recognized as the ‘shape from shading problem’ [10, 11]. Various numerical schemes were proposed over the years, most of these methods were based on variational principles that require additional regularization terms that intro- duce second order derivatives into the minimization process. These terms yield over-smoothed reconstruc- tions, see e.g. [12]. Only two early direct models for the shape from shading did not incorporate extra smooth- ness terms, the first is the characteristic strips expan- sion method that Horn used when he first introduced the problem [10], the second is Bruckstein’s equal height contours tracking model [3]. Unfortunately, the first implementations of these algorithms suffered from numerical instabilities. New numerical algorithms based on recent results in curve evolution theory, control theory, and the viscosity framework [5], were applied to the shape from shading problem in [8, 15, 16, 24]. In these advanced numeri- cal algorithms the smoothness assumption is embed- ded within the scheme without the need for an extra smoothness as a penalty. Recently, Sethian [26, 27] introduced an O ( N log N ) computational steps sequential steps algorithm for solving the Eikonal equation on a rectangular grid, where N is the total number of grid points. This al- gorithm, known as the ‘Fast Marching Method,’ re- lies on a systematic causality relationship based on up- winding, coupled with a heap structure for efficiently ordering the updated points. The method was applied to segmentation in 3D in [23] and to edge integration in [4].