Code covered by the BSD License  

Highlights from
Surface Reconstruction from Gradient Fields: grad2Surf Version 1.0

Be the first to rate this file! 34 Downloads (last 30 days) File Size: 356 KB File ID: #43149
image thumbnail

Surface Reconstruction from Gradient Fields: grad2Surf Version 1.0

by

 

This toolbox is for the regularized reconstruction of a surface from its measured gradient field.

| Watch this File

File Information
Description

Regularized Least-Squares Surface Reconstruction from Gradient Fields: grad2Surf Version 1.0

This toolbox is for the reconstruction of a surface from its measured gradient field. It is assumed that the gradient field is corrupted by noise, and thereby the package provides algorithms which compute the least-squares solution to the problem, along with various forms of regularization, including:

1) Spectral Regularization
2) Tikhonov Regularization
3) Constrained Regularization (Dirichlet Boundary Values)
4) Weighted Least-Squares

Examples of these types of regularization and how to use the toolbox are given in the accompanying documentation file: g2sIntro.pdf

This toolbox requires the Discrete Orthogonal Polynomial Toolbox (DOPbox):
http://www.mathworks.com/matlabcentral/fileexchange/41250

The theory behind this toolbox is described in the papers:
[1] Harker, M., O’Leary, P., Regularized Reconstruction of a Surface from its Measured Gradient Field, (preprint available at arxiv.org)
[2] Harker, M., O’Leary, P., Direct regularized surface reconstruction from gradients for Industrial Photometric Stereo, Computers in Industry, In Press, 2013.
http://dx.doi.org/10.1016/j.compind.2013.03.013

See also:
[3] Harker, M., O’Leary, P., Least squares surface reconstruction from measured gradient fields, IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2008, pp. 1-7.
http://dx.doi.org/10.1109/CVPR.2008.4587414
[4] Harker, M., O’Leary, P., Least squares surface reconstruction from gradients: Direct algebraic methods with spectral, Tikhonov, and constrained regularization, IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2011, pp. 2529-2536.
http://dx.doi.org/10.1109/CVPR.2011.5995427

Acknowledgements

Publish2latex and Discrete Orthogonal Polynomial Toolbox: Dop Box Version 1.8 inspired this file.

This file inspired Wavelet Based Image Reconstruction From Gradient Data.

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Other requirements DOPbox http://www.mathworks.com/matlabcentral/fileexchange/41250
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
02 Sep 2013 Matthew Harker, Paul O'Leary,

Indeed there was an error in dopDiffLocal which was a result of a change made in Version 1.6. We have deposited a corrected version of the library (Version 1.7).

29 Aug 2013 E

Hello again,

I just got the code working by replacing line 157 in the m-file "dopDiffLocal.m" from

rS = rank( S );

to

rS = sprank( S );

since the error I was getting before seemed to have been generated by the fact that the matrix S is sparse, and the function rank does not work with sparse matrices.

Please let me know your take on this modification (i.e., if this was your intended meaning in the context).

Thanks again,

E.

29 Aug 2013 E

Dear authors,

I have downloaded your code for surface reconstruction from gradient for comparison purposes. I am in the early testing stages, and I tried generating a test surface using the function provided "g2sTestSurf.m". Specifically, I tried:

[Z,Zx,Zy,x,y] = g2sTestSurf(121,121,'even',1);

This works, and I can see the test surface as well as its gradient components, but when I try to reconstruct the surface from the gradient, by typing in the command:

Zr = g2s( Zx, Zy, x, y );

I get the following error message:

Error using svd
Use svds for sparse singular values and vectors.

Error in rank (line 15)
s = svd(A);

Error in dopDiffLocal (line 157)
rS = rank( S );

Error in g2s (line 82)
Dx = dopDiffLocal( x, N, N, 'sparse' ) ;

Could you please let me know what it is that I am doing wrong?

Thank you in advance,

E.

Contact us