source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/zisserman/vgg_multiview/vgg_line3d_Ppv.m @ 37

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

Added original make3d

  • Property svn:executable set to *
File size: 706 bytes
Line 
1% Q = vgg_line3d_Ppv(P)  Transforms a camera matrix to use it with Pluecker vector 3d line representation.
2%
3% P ... double(3,4), ordinary camera matrix
4% Q ... double(6,3), transformed camera matrix (quadratic function of elements of P)
5%   such that the projection of a 3d line by the camera is given by
6%
7%     l = Q*L
8%
9% where l is 1-by-3 image line vector, and L is 1-by-6 Pluecker vector of the 3d line.
10
11% T.Werner
12
13function Q = vgg_line3d_Ppv(P)
14 
15K = size(P,1)/3;
16i1 = 1:3:3*K;
17i2 = 2:3:3*K;
18i3 = 3:3:3*K;
19
20Q(:,i1) = vgg_line3d_pv_from_XY(P(i2,:)',P(i3,:)')';
21Q(:,i2) = vgg_line3d_pv_from_XY(P(i3,:)',P(i1,:)')';
22Q(:,i3) = vgg_line3d_pv_from_XY(P(i1,:)',P(i2,:)')';
23
24return
Note: See TracBrowser for help on using the repository browser.