% calculates projection matrix Q for lines from P see PCV (12.71) Usage: Q = calc_Q_from_P (P) P - 4 x 3-projection matrix P = K*R*[I|-Z] Q - 3x6 projection matrix for lines Wolfgang Förstner wfoerstn@uni-bonn.de See also calc_P_from_KRZ, calc_KRZ_from_P, calc_viewing_direction
0001 %% calculates projection matrix Q for lines from P 0002 % see PCV (12.71) 0003 % 0004 % Usage: 0005 % Q = calc_Q_from_P (P) 0006 % 0007 % P - 4 x 3-projection matrix P = K*R*[I|-Z] 0008 % Q - 3x6 projection matrix for lines 0009 % 0010 % Wolfgang Förstner 0011 % wfoerstn@uni-bonn.de 0012 % 0013 % See also calc_P_from_KRZ, calc_KRZ_from_P, calc_viewing_direction 0014 0015 function Q = calc_Q_from_P (P) 0016 0017 A=P(1,:)'; 0018 B=P(2,:)'; 0019 C=P(3,:)'; 0020 0021 Q=[(calc_Pi(B) * C)'; ... 0022 (calc_Pi(C) * A)'; ... 0023 (calc_Pi(A) * B)'];