source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/missing-data/affine_error.m
@
37
Last change on this file since 37 was 37, checked in by , 14 years ago | |
---|---|
File size: 367 bytes |
Rev | Line | |
---|---|---|
[37] | 1 | function err = affine_error(M,pts,r) |
2 | ||
3 | [U, S, V] = svd(M); | |
4 | V = V(:,1:r)*S(1:r,1:r); | |
5 | ||
6 | % V = find_rigid(Mapp,r); % returns 3D structure, up to a rigid xform. | |
7 | ||
8 | pts = pts(1:3,:)'; | |
9 | A = V\pts; | |
10 | ||
11 | %may want to take into account the missing points here -- ie, weight | |
12 | %points by the number of frames in which they appeared. | |
13 | ||
14 | err = sum(sum((V*A - pts).^2)); | |
15 | ||
16 |
Note: See TracBrowser
for help on using the repository browser.