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 , 14 years ago | |
---|---|
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 | |
12 | function i = k2i(k,step) |
13 | |
14 | if nargin<2 |
15 | step = 3; |
16 | end |
17 | |
18 | k = k(:)'; |
19 | i = [1:step]'*ones(size(k)) + step*(ones(step,1)*k-1); |
20 | i = i(:); |
Note: See TracBrowser
for help on using the repository browser.