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

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

Added original make3d

File size: 686 bytes
Line 
1function INC = motion_incidence(fo,nframes,npoints)
2% Each column is a point.  Rows 2i and 2i+1 are the x and y
3%  coordinates of the point in frame i.
4
5INC = ones(2*nframes,npoints);
6for i = 1:npoints
7  % There's got to be an easy way to do this without looping.
8  rn = rand;
9  if rn < 2/3
10     ol = occlusion_length(fo*nframes,nframes);
11     if rn < 1/3
12        INC((1+2*nframes-2*ol):(2*nframes),i) = zeros(2*ol,1);
13     else
14        INC(1:2*ol,i) = zeros(2*ol,1);
15     end
16  else
17    ol1 = occlusion_length(fo*nframes/2,nframes/2);
18    ol2 = occlusion_length(fo*nframes/2,nframes/2);
19    ol = ol1+ol2;
20    INC([1:2*ol1,(1+2*nframes-2*ol2):(2*nframes)],i) = zeros(2*ol,1);
21  end
22end
Note: See TracBrowser for help on using the repository browser.