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

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

Added original make3d

File size: 1.4 KB
Line 
1function y = compare_real_motion(fo,D,s,n)
2% This is meant to be like compare_motion, but with a real motion matrix
3% instead of generating a random one.
4num_random_starts = 5;
5nframes = size(D,1)/2;
6npoints = size(D,2);
7
8for j = 1:n
9  INC = motion_incidence(fo,nframes,npoints);
10  Dtj = remove_translations(D, INC);
11  M = approx_full_matrix(Dtj,3);
12  ERR = Dtj - M;
13  if rem(j,5)==0
14    y = [y', compare(M,INC,3,ERR,s,num_random_starts)']';
15  else
16    y = [y', compare(M,INC,3,ERR,s,num_random_starts)']';
17  end
18end
19 
20% First of all, we remove translation as best we can from the occluded data,
21% and then give all the methods the same translation-free problem.  This
22% should provide a level playing field, while indicating the noise that
23% occurs when there might be errors in determining translation.  The other
24% alternative would be to give ground truth a translation based on all the
25% data.
26
27% Now, M is our pseudo-ground truth; ie. the best guess to the error free matrix.
28% M + ERR is Dtj, which is the data matrix with translation removed, as best
29%   we can.  The "error" in ground truth will be the difference between our
30%   best guess of M and the data; sounds ok.
31% If we feed M and ERR to 'compare', we'll be ok since M is only used:
32% a) added to ERR to give the data matrix.  This is in fact what we're trying
33% to approximate with a rank three matrix.  and b) as the ground truth.
Note: See TracBrowser for help on using the repository browser.