Search
Following functions should be implemented. It is important to keep the specified calling convention (order of arguments, shape of matrices, etc).
Note: vectors of coordinates (e.g., points) should be always columns . Thus a set of 5 euclidean points in a plane is written as a matrix with 2 rows and 5 columns (i.e., 2 x 5).
u_p = e2p( u_e )
u_e
u_p
u_e = p2e( u_p )
>> u = e2p( [[1;2] [3;4] [5;6]] ) u = 1 3 5 2 4 6 1 1 1 >> p2e( u ) ans = 1 3 5 2 4 6
l = vlen( x )
x
l
>> vlen( [ [0.5;0.5;1] [3;4;0]]) ans = 1.2247 5.0000
S = sqc(x)
S
Notes: The vector x characterises the left as well as the right null space of the matrix S. For any vector y, cross product x×y equals to S y.
y
>> sqc( [1;2;3] ) ans = 0 -3 2 3 0 -1 -2 1 0
This is obsolete, create EutoRt instead.
[R, b] = EutoRb( E, u1, u2 )
E
u1
u2
R
b
Notes: The sessential matrix E is decomposed such that E = R * sqc( b ).
E = R * sqc( b )
[R, t] = EutoRt( E, u1, u2 )
t
Notes: The sessential matrix E is decomposed such that E ~ sqc(t) * R. Note that t = -R*b.
E ~ sqc(t) * R
t = -R*b
X = Pu2X( P1, P2, u1, u2 )
P1, P2
X
err = err_F_sampson( F, u1, u2 )
F
e
[nu1, nu2] = u_correct_sampson( F, u1, u2 )
nu1,nu2