source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/missing-data/approx_full_matrix.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 316 bytes
Line 
1function [L, pts] = approx_full_matrix(M,r)
2% approximate a matrix, M, that has no missing elements, with a rank r matrix
3% this is essentially the Tomasi and Kanade algorithm.
4
5[u,s,v] = svd(M);
6vp = v';
7% M = u*s*vp
8ur = u(:,1:r);
9sr = s(1:r,1:r);
10vpr = vp(1:r,:);
11L = ur*sr*vpr;
12pts = [vpr; ones(1,size(vpr,2))];
Note: See TracBrowser for help on using the repository browser.