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

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

Added original make3d

File size: 735 bytes
Line 
1%       By Philip Torr 2002
2%       copyright Microsoft Corp.
3%%%%%%this is going to be my first try at some symbolic stuff
4
5%%%the purpose of this file is to set up an essential matrix that you can later do symbolic manipulation of,.
6
7
8syms tx ty tz;
9
10Tx = [0 -tz ty; tz 0 -tx; -ty tx 0];
11
12%rodriggues formula a rotation angle l m n axis
13
14syms lx ly lz a
15
16Id = [1 0 0; 0 1 0; 0 0 1]
17Ax = [0 -lz ly; lz 0 -lx; -ly lx 0];
18rot_axT = [ lx ly lz]
19rot_ax = [ lx; ly; lz]
20
21R = (cos(a) * Id + sin(a) * Ax + (1 - cos(a)) *  rot_ax * rot_axT)
22
23
24E = Tx * R
25
26syms foc
27
28Ca = [1 0 0; 0 1 0; 0 0 foc]
29
30G = Ca * E * Ca
31%det(E)
32%0.5 * (trace( E * E'))^2 - trace((E * E')^2)
33
34syms x1 x2 y1 y2
35
36
37
38r = [x2 y2 1] * G * [x1; y1; 1]
Note: See TracBrowser for help on using the repository browser.