Shape and Source from Shading

Michael J. Brooks, Berthold K. P. HornIJCAI 1985

Abstract

In computer vision, the recovery of three-dimensional shape from a single two-dimensional image—a process known as Shape-from-Shading (SFS)—traditionally requires prior knowledge of the light source's direction and intensity. However, in most practical scenarios, these parameters are unknown. This paper presents a variational framework that simultaneously recovers both the surface shape and the light source direction. By framing the problem as a constrained minimization task, the authors demonstrate that an iterative algorithm can robustly converge to an accurate solution for both variables, even in the presence of significant image noise.

Introduction

The "Shape-from-Shading" problem is often described as a "chicken and egg" dilemma: to determine the shape of an object, one must know the lighting conditions; yet, to determine the lighting conditions, one typically needs to know the object's shape. Early methods in the mid-1980s were often brittle, relying on perfectly calibrated "reflectance maps" or assuming local surface properties (such as spherical "umbilical" points) that rarely held true for complex objects.

Brooks and Horn proposed a global, iterative approach to break this cycle. Their method does not require a pre-calibrated reflectance map and instead treats the light source direction as an unknown variable to be optimized alongside the surface normals.

The Variational Framework

The authors formulate the problem using a functional minimization approach. They seek to find a set of surface normals $\mathbf{n}$ and a source direction $\mathbf{s}$ that minimize a cost function consisting of three primary terms:

  1. Brightness Error: This term measures the discrepancy between the observed image intensity and the intensity predicted by a Lambertian reflectance model (the dot product $\mathbf{n} \cdot \mathbf{s}$).
  2. Regularization (Smoothness): To ensure the resulting shape is physically plausible, a smoothness constraint is applied to penalize sharp or jagged transitions between adjacent surface normals.
  3. Unit Constraint: Unlike earlier methods that used surface gradients ($p, q$), which can approach infinity at occluding boundaries, this framework uses unit normal vectors. A Lagrangian multiplier is employed to ensure that every recovered vector maintains a length of exactly one.

The Iterative Algorithm

The minimization of the functional leads to a set of Euler equations, which the authors solve using an alternating iterative scheme:

  • Shape Update: With the current estimate of the light source fixed, the surface normals are updated by averaging them with their neighbors and adjusting them based on the local brightness error.
  • Source Update: With the current estimate of the surface normals fixed, the optimal light source direction is calculated. A key insight of the paper is that this step can be solved in closed form using a simple $3 \times 3$ matrix inversion, making the source estimation computationally efficient compared to the shape recovery.

Experimental Results and Robustness

The algorithm was evaluated using synthetic datasets, including a Lambertian sphere and a "capsule" shape (a cylinder with hemispherical ends). These shapes provided a ground truth for measuring accuracy.

  • Accuracy: On the synthetic sphere, the algorithm achieved an average angular error for surface normals of less than 3° after 100 iterations. The light source direction was recovered with an error of only 1.5°.
  • Noise Robustness: The global nature of the minimization makes the method highly resistant to noise. When Gaussian noise was injected into the sphere image (a perturbation of 34 units on a 0-255 scale), the source-finder still estimated the light direction to within 2.7° of the true value. This suggests that errors in one part of the image effectively cancel out errors in another during the global optimization.

Key Insights and Limitations

One of the most significant theoretical contributions of the paper is the identification of the "Dual" Ambiguity. The authors proved that for any valid shape and light source pair, there exists a mathematically consistent "dual" shape and source that produces the identical image. Consequently, any SFS algorithm might converge to either the true solution or its dual depending on the initial starting conditions.

Despite its robustness, the method has limitations. The iterative process can be slow to propagate information across the surface, a problem the authors suggest could be mitigated by "multigrid" techniques. Additionally, the core model assumes a single point source at infinity and does not account for complex phenomena like inter-reflections or multiple light sources.

Conclusion

Brooks and Horn’s work transformed Shape-from-Shading from a brittle, local estimation problem into a robust global optimization task. By demonstrating that the light source can be recovered as a byproduct of the shape recovery process, they provided a foundational framework for modern inverse rendering and 3D reconstruction techniques.

Summary updated

BibTeX
@inproceedings{brooks1985shape,
  author = {Michael J. Brooks and Berthold K. P. Horn},
  title = {{Shape and Source from Shading}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1985},
}
Figure