source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/missing-data/compare_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 [err, aff_err, stab] = compare_motion(fo,nframes,npoints,frot,sigma,s,n)
2% fo = expected fraction of frames points are occluded.  The actual number
3%   of frames a point appear in is generated randomly for each point.
4% nframes = number frames
5% npoints = number points
6% frot = fraction of 2*pi for rotation in depth.
7% sigma = magnitude of Gaussian error.  Pt. coordinates typically range
8%   between -1 and 1, so a reasonable setting might be .01, or .005.
9% s = number of samples to draw in my method.
10% n = number times to repeat exp.
11
12% stab tells, for each iteration, whether the rankr result was stable.
13
14% there are a number of other parameters set in these experiments.
15% In motion generation, there is amount of translation (0) and in-plane rotation.
16%   in shum there are the number of iterations to try.
17
18stab = [];
19err = [];
20aff_err = [];
21num_random_starts = 5;
22
23for j = 1:n
24  [M,INC,pts] = occluded_motion(fo,nframes,npoints,frot,0);
25  ERR = randn(size(M)).*sigma;
26  if rem(j,1000)==0
27    [e, a, stable] = compare_affine(M,INC,3,ERR,pts,s,num_random_starts, j);
28    stab = [stab', stable']'
29    err = [err', e']'
30    aff_err = [aff_err', a']'
31  else
32    [e, a, stable] = compare_affine(M,INC,3,ERR,pts,s,num_random_starts, j);
33    stab = [stab', stable']';
34    err = [err', e']';
35    aff_err = [aff_err', a']';
36  end
37end
38
Note: See TracBrowser for help on using the repository browser.