% get depth for central camera given extrinsic parameters explicite and normalized image image directions Usage: d = calc_depth_central_xs(X,R,Z,xs) X - 4-vector of 3D point R - 3x3 matrix of rotation Z - 3x1-vector of projection centre xs - 3x1-vector of direction, normalized d - depth, is positive if point is in front of camera Wolfgang Förstner 4/2013 wfoerstn@uni-bonn.de See also calc_depth_central_x, calc_depth_central_xs, calc_depth_perspective
0001 %% get depth for central camera given extrinsic parameters explicite 0002 % and normalized image image directions 0003 % 0004 % Usage: 0005 % d = calc_depth_central_xs(X,R,Z,xs) 0006 % 0007 % X - 4-vector of 3D point 0008 % R - 3x3 matrix of rotation 0009 % Z - 3x1-vector of projection centre 0010 % xs - 3x1-vector of direction, normalized 0011 % 0012 % d - depth, is positive if point is in front of camera 0013 % 0014 % Wolfgang Förstner 4/2013 0015 % wfoerstn@uni-bonn.de 0016 % 0017 % See also calc_depth_central_x, calc_depth_central_xs, calc_depth_perspective 0018 0019 function d = calc_depth_central_xs_RZ(X,R,Z,xs) 0020 0021 d = xs'*R*(X(1:3)/X(4)-Z);