视觉(10)从Essential Matrix估计R,T

%
clc
clear
t
=rand(3,1)
R
=rodrigues(rand(3,1))
T
=[0 -t(3) t(2);
    t(
30 -t(1);
    
-t(2) t(10
];

E
=T*R
[U,S,V]
=svd(E);
disp(
'S?=?diag(1,1,0)')
S
W
=[0 -1 0;
    
1 0 0;
    
0 0 1
];
P1
=[U*W*V' U(:,3)]
P2=[U*W'*V' U(:,3)]
disp(
'check R..')
norm(U
*W*V'-R)
norm(U*W'*V'-R)

disp(
'check t..')
norm(U(:,
3- t/norm(t))
norm(
- U(:,3- t/norm(t))

posted on 2007-07-12 12:55  cutepig  阅读(2090)  评论(1编辑  收藏  举报

导航