From Shading to Local Shape

Ying Xiong, Ayan Chakrabarti, Ronen Basri, Steven J. Gortler, David W. Jacobs, Todd E. Zickler · DOI

Abstract

We develop a framework for extracting a concise representation of the shape information available from diffuse shading in a small image patch. This produces a mid-level scene descriptor, comprised of local shape distributions that are inferred separately at every image patch across multiple scales. The framework is based on a quadratic representation of local shape that, in the absence of noise, has guarantees on recovering accurate local shape and lighting. And when noise is present, the inferred local shape distributions provide useful shape information without over-committing to any particular image explanation. These local shape distributions naturally encode the fact that some smooth diffuse regions are more informative than others, and they enable efficient and robust reconstruction of object-scale shape. Experimental results show that this approach to surface reconstruction compares well against the state-of-art on both synthetic images and captured photographs.

Introduction: The Challenge of Shape-from-Shading

Shape-from-shading (SfS) is a foundational problem in computer vision, aiming to recover 3D geometry from surface brightness variations. Historically, SfS has been plagued by "point-wise ambiguity"—a single pixel's intensity only constrains the surface normal to a cone of possible directions. Traditional global strategies, such as assuming surface smoothness or propagating information from singular points, often fail in real-world scenarios where shading is confounded by texture, shadows, and specularities. This work proposes a shift in perspective: instead of analyzing individual pixels, we can extract significantly more information by analyzing small image patches as local quadratic surfaces.

A Quadratic Framework for Local Shape

The core of this approach is modeling the depth of small image patches (e.g., 5x5 or 9x9 pixels) as quadratic functions. This higher-order representation captures surface curvature, which provides the necessary constraints to break traditional ambiguities.

Theoretical Uniqueness and Ambiguity

The authors prove that if a patch is perfectly quadratic, its shape is uniquely determined when the light direction is known. In cases where the light direction is unknown, the problem is not entirely ill-posed; rather, there are generically only four possible physical explanations, appearing as two "convex-concave" pairs.

The four-way ambiguity of local shape under unknown lighting. For a given patch, there are typically four physical explanations consistent with the shading.

Local Shape Distributions

In practice, image noise and deviations from perfect quadratic geometry mean that a single "best" fit is often unreliable. To address this, the framework produces a local shape distribution—a mid-level descriptor that represents the likelihood of various quadratic surfaces for a given patch. These distributions often reveal that likely shapes lie on a one-dimensional manifold within the 5D space of quadratic parameters.

Local shape distributions inferred for various patches on a frog model. The color indicates log-likelihood, showing how the algorithm samples the manifold of likely quadratic shapes.

By maintaining a distribution rather than a single estimate, the system adheres to Marr’s principle of "least commitment," allowing global context to resolve local ambiguities later in the pipeline.

Global Reconstruction via Mosaicking

To reconstruct a full object, the algorithm employs an iterative "mosaic" approach across multiple scales. By dividing the image into overlapping patches, the system alternates between:

  1. Selection: Choosing the most likely local shape proposal for each patch that maintains consistency with its neighbors.
  2. Integration: Fitting a global smooth surface to these selected local "tiles."

Using multiple scales (from 3x3 to 17x17 pixels) allows the system to balance the precision of small patches with the stronger signal-to-noise ratio of larger ones.

Experimental Evaluation

The framework was validated on both synthetic and real-world datasets:

  • Synthetic Surfaces: 128x128 surfaces with varying Gaussian noise and specular highlights. The proposed method significantly outperformed state-of-the-art baselines like "SIRFS" and "Polynomial SfS," demonstrating superior robustness to noise and non-Lambertian effects.
  • Real-World Photographs: Using a dataset of diffuse objects (e.g., a cat, frog, hippo) with ground truth obtained via photometric stereo. The method achieved median angular errors for surface normals between 11.8° and 28.1°, providing faithful global reconstructions where other methods struggled.

Conclusion

By leveraging local quadratic models and probabilistic distributions, this framework provides a robust path from shading to 3D shape. It effectively manages the inherent ambiguities of the SfS problem and scales well to complex, real-world objects. Future work may involve integrating additional cues like occluding contours and texture to further enhance reconstruction accuracy in "in the wild" scenarios.

Summary updated

BibTeX
@article{xiong2013from,
  author = {Ying Xiong and Ayan Chakrabarti and Ronen Basri and Steven J. Gortler and David W. Jacobs and Todd E. Zickler},
  title = {{From Shading to Local Shape}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2013},
  doi = {10.1109/tpami.2014.2343211},
}
Figure