torr_etort.m

来自「matlab三维重建程序」· M 代码 · 共 26 行

M
26
字号
%	By Philip Torr 2002
%	copyright Microsoft Corp.
%this function will convert an essential matrix to a rotation and translation martix
%as set out in Hartley and Zisserman.

%note there are 4 solutions in all, two (for sign of translation) times 2 for 2 different rotation matrices,

%note E + T_x R

function [Tx,R1,R2] = torr_EtoRt(E)

[U,S,V] = svd(E);


%use Hartley matrices:
W = [0 -1 0; 1 0 0; 0 0 1];
Z = [0 1 0; -1 0 0; 0 0 0];

Tx = U * Z * U';

R1 = U * W * V';

R2 = U * W' * V';


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?