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

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

Added original make3d

File size: 519 bytes
Line 
1%       By Philip Torr 2002
2%       copyright Microsoft Corp.
3%this function will convert an essential matrix to a rotation and translation martix
4%as set out in Hartley and Zisserman.
5
6%note there are 4 solutions in all, two (for sign of translation) times 2 for 2 different rotation matrices,
7
8%note E + T_x R
9
10function [Tx,R1,R2] = torr_EtoRt(E)
11
12[U,S,V] = svd(E);
13
14
15%use Hartley matrices:
16W = [0 -1 0; 1 0 0; 0 0 1];
17Z = [0 1 0; -1 0 0; 0 0 0];
18
19Tx = U * Z * U';
20
21R1 = U * W * V';
22
23R2 = U * W' * V';
24
25
Note: See TracBrowser for help on using the repository browser.