Abstract
We present a method that enhances the performance of depth-from-defocus (DFD) through the use of shading information. DFD suffers from important limitations—namely coarse shape reconstruction and poor accuracy on textureless surfaces—that can be overcome with the help of shading. We integrate both forms of data within a Bayesian framework that capitalizes on their relative strengths. Shading data, however, is challenging to recover accurately from surfaces that contain texture. To address this issue, we propose an iterative technique that utilizes depth information to improve shading estimation, which in turn is used to elevate depth estimation in the presence of textures. With this approach, we demonstrate improvements over existing DFD techniques, as well as effective shape reconstruction of textureless surfaces.
Introduction
Estimating 3D shape from 2D images is a cornerstone of computer vision. Two popular passive methods, Depth-from-Defocus (DFD) and Shape-from-Shading (SFS), have complementary strengths and weaknesses. DFD estimates depth by measuring image blur at different focus settings, performing best on textured surfaces but failing on smooth ones. Conversely, SFS uses light intensity to infer orientation, excelling at fine details on textureless surfaces but struggling with textured ones due to the ambiguity between shading and albedo.
This paper introduces a Bayesian framework that combines DFD with shading information to produce high-resolution depth maps. By iteratively alternating between depth estimation and intrinsic image decomposition, the method overcomes the traditional coarse reconstruction of DFD while successfully handling complex textures that typically baffle shape-from-shading algorithms.
Methodology
The core of the approach is a Bayesian framework implemented via a Markov Random Field (MRF) with three key innovations:
- Shading-Based Prior: Standard DFD uses a simple smoothness prior that often blurs fine details. This method replaces it with a shading-based prior where the depth of neighboring pixels is constrained to match the surface orientation suggested by shading.
- Iterative Refinement: An iterative loop is employed. A rough DFD depth estimate helps separate the image into shading and texture components (Intrinsic Image Decomposition). This refined shading then improves the depth estimate in the next iteration.
- Depth-Guided Intrinsic Decomposition: A modified Retinex model uses the current depth estimate to group pixels with likely similar surface normals, providing a powerful constraint for decomposition that traditional methods lack.
Experimental Results
The method was evaluated using synthetic 3D models (Buddha, Feline, Zebra) and real-world images captured with a Canon 5D Mark II.
Quantitatively, the iterative approach significantly reduced depth error on synthetic textured objects. For example, on the "Zebra" model, error dropped from ~0.15 to ~0.05 compared to standard DFD. Qualitatively, the results on real images are striking; the proposed method recovers fine details like fabric folds and ceramic scales that appear "blobby" in standard DFD. Furthermore, the method successfully reconstructed a white plaster bust where standard DFD produced significant artifacts due to the lack of texture.
Conclusion and Future Work
The synergy between DFD and shading allows for high-frequency detail recovery while maintaining global structure. Texture is treated as a bridge for DFD rather than a barrier for shading. While the current model assumes Lambertian surfaces and requires lighting calibration, future work aims to incorporate light visibility and shadowing calculations to handle more complex, "in-the-wild" scenarios.
Summary updated