yqueau / normal_integration

Matlab codes for integrating the normal (gradient) field of a surface over a 2D grid
GNU General Public License v3.0
56 stars 13 forks source link

Codes_Integration

Matlab codes for integration of normals (gradient) over a non-rectangular 2D grid, without boundary condition.

Introduction

In many computer vision applications (e.g. photometric stereo, shape-from-shading, shape-from-polarization or deflectometry), one estimates the local surface orientation (i.e., normals) in each pixel. A subsequent step consists in integrating these normals into a depth map. These Matlab codes implement the variational normal integration methods discussed in [1], and three famous methods for solving the Poisson equation, which were discussed in our survey [2]. These journal papers summarize research previously presented in the conference papers [3,4,5].

Features:

Demos

The following demo files are provided:

Contents

The main fuctions for the new variational methods in [1] are in the Toolbox/ folder:

The four Poisson solvers discussed in [2, Sec. 3] are also provided:

Dependencies

We strongly recommend to use the CMG preconditioner from Koutis et al., which can be downloaded here: http://www.cs.cmu.edu/~jkoutis/cmg.html

If CMG it is not installed, set the "precond" parameter to "none" (no preconditioning, can be very slow for large data) or to "ichol" (modified incomplete Cholesky preconditioner advised in [6], slower than CMG but overall OK). This will be slower, but it should run without any additional library.

Usage

References

[1] "Variational Methods for Normal Integration", Quéau et al., Journal of Mathematical Imaging and Vision 60(4), pp 609--632, 2018. (Arxiv preprint: https://arxiv.org/abs/1709.05965)

[2] "Normal Integration: a Survey", Quéau et al., Journal of Mathematical Imaging and Vision 60(4), pp 576--593, 2018. (Arxiv preprint: https://arxiv.org/abs/1709.05940)

These methods build upon three previous conference papers. The new quadratic method is an extension of the method in [3]. The non-convex integrator was introduced in [4], and the TV one in [5].

[3] "Integration of a Normal Field without Boundary Condition", Durou and Courteille, ICCVW 2007

[4] "Integrating the Normal Field of a Surface in the Presence of Discontinuities", Durou et al., EMMCVPR2009

[5] "Edge-Preserving Integration of a Normal Field: Weighted Least Squares and L1 Approaches", Quéau and Durou, SSVM2015

The modified incomplete Cholesky preconditioner is advised in:

[6] "Fast and accurate surface normal integration on non-rectangular domains", Bähr et al., Computational Visual Media 3(2), pp. 107--129, 2017

Author of codes: Yvain Quéau, Technical University Munich, yvain.queau@tum.de