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 , 15 years ago | |
---|---|
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 | |
11 | function [K,R,t,C] = P2KRtC(P) |
12 | |
13 | P = P./norm(P(3,1:3)); |
14 | |
15 | [K,R] = rq(P(:,1:3)); |
16 | t = inv(K)*P(:,4); |
17 | C = -R'*t; |
18 | |
19 | return; |
Note: See TracBrowser
for help on using the repository browser.