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 , 15 years ago | |
---|---|
File size: 265 bytes |
Rev | Line | |
---|---|---|
[37] | 1 | function err = trans_affine_error(M,pts) |
2 | ||
3 | [U,S,V] = svd(remove_translations(M,0)); | |
4 | ||
5 | V = V(:,1:3)*S(1:3,1:3); | |
6 | V = [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.