source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/BlueCCal/MultiCamSelfCal/MartinecPajdla/utils/k2i.m @ 37

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

Added original make3d

File size: 392 bytes
Line 
1%k2i Compute indices of matrix rows corresponding to views k [with some step].
2%
3%  i = k2i(k [,step])
4
5%  If k is scalar, it is i = [1:step]+step*(k-1).
6%
7%  Default: step = 3
8%
9%  E.g., for REC.u, REC.P, REC.X use k2i(k),
10%        for REC.q use k2i(k,2).
11
12function i = k2i(k,step)
13
14if nargin<2
15  step = 3;
16end
17
18k = k(:)';
19i = [1:step]'*ones(size(k)) + step*(ones(step,1)*k-1);
20i = i(:);
Note: See TracBrowser for help on using the repository browser.