source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/torr/torr_g2F.m @ 37

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

Added original make3d

File size: 702 bytes
Line 
1%       By Philip Torr 2002
2%       copyright Microsoft Corp.
3
4
5
6%
7% %here p is the set of paramets such that
8% g(1) = focal length
9% g(2-3) sperical coordinates of rotation axis
10% g(4) rotation angle
11% g(5-6) is the translation vector
12
13function f = torr_g2F(g,C)
14
15%convert intrinsic and extinsics to a F matrix
16C(3,3) = 1/g(1);
17rot_axis = torr_sphere2unit([g(2) g(3)]);
18tt = torr_sphere2unit([g(5) g(6)]);
19rot_angle = g(4);
20
21%Rogregues
22II = [1 0 0; 0 1 0; 0 0 1];
23AX = torr_skew_sym(rot_axis);
24RR = cos(rot_angle) * II +sin(rot_angle) * AX + (1 - cos(rot_angle)) * rot_axis * rot_axis';
25
26TX = torr_skew_sym(tt);
27nnE = TX * RR;
28
29F = inv(C') *  nnE * inv(C);
30f = reshape(F',9,1);
31
32
Note: See TracBrowser for help on using the repository browser.