source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/missing-data/trans_affine_error.m @ 98

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

Added original make3d

File size: 265 bytes
Line 
1function err = trans_affine_error(M,pts)
2
3[U,S,V] = svd(remove_translations(M,0));
4
5V = V(:,1:3)*S(1:3,1:3);
6V = [V,ones(size(V,1),1)];
7
8  pts = pts(1:3,:)';
9  pts = [pts, zeros(size(pts,1),1)];
10  A = V\pts;
11  B = V*A;
12  err = sum(sum((B(:,1:3) - pts(:,1:3)).^2));
Note: See TracBrowser for help on using the repository browser.