source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/BlueCCal/MultiCamValidation/CoreFunctions/P2KRtC.m @ 86

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

Added original make3d

File size: 411 bytes
Line 
1% [K,R,t,C] = P2KRtC(P)
2% decompose the euclidean 3x4 projection matrix P into the
3%
4% K ... 3x3 upper triangular calibration matrix
5% R ... 3x3 rotation matrix
6% t ... 3x1 translation vector
7% C ... 3x1 position od the camera center
8%
9% $Id: P2KRtC.m,v 2.0 2003/06/19 12:07:08 svoboda Exp $
10
11function [K,R,t,C] = P2KRtC(P)
12
13P = P./norm(P(3,1:3));
14
15[K,R] = rq(P(:,1:3));
16t = inv(K)*P(:,4);
17C = -R'*t;
18
19return;
Note: See TracBrowser for help on using the repository browser.