Home > 13-Two-View-Geometry > Functions > generate_point_pair.m

generate_point_pair

PURPOSE ^

% generate_point_pair

SYNOPSIS ^

function [u,v] = generate_point_pair(X,b,Rot,sigma)

DESCRIPTION ^

% generate_point_pair

 X        = 4x1 vector, 3D point
 b,Rot    = relative orientation
 sigma    = radial error of direction

 [u,v] = generate_point_pair(X,b,R,sigma)

 Wolfgang Förstner 04/2014
 wfoerstn@uni-bonn.de

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% generate_point_pair
0002 %
0003 % X        = 4x1 vector, 3D point
0004 % b,Rot    = relative orientation
0005 % sigma    = radial error of direction
0006 %
0007 % [u,v] = generate_point_pair(X,b,R,sigma)
0008 %
0009 % Wolfgang Förstner 04/2014
0010 % wfoerstn@uni-bonn.de
0011 
0012 
0013 function [u,v] = generate_point_pair(X,b,Rot,sigma)
0014 
0015 % projection matrices
0016 P1 =     [eye(3) zeros(3,1)];
0017 P2 = Rot*[eye(3),-b];
0018 
0019 % true directions
0020 u_true = P1*X; u_true = u_true/norm(u_true);
0021 v_true = P2*X; v_true = v_true/norm(v_true);
0022 
0023 % perturbed directions, only two angles are affected,
0024 R_1 = calc_Rot_rod(sigma*randn(3,1));
0025 u   = R_1*u_true;
0026 u   = u/norm(u);
0027 R_2 = calc_Rot_rod(sigma*randn(3,1));
0028 v   = R_2*v_true;
0029 v   = v/norm(v);

Generated on Sat 21-Jul-2018 20:56:10 by m2html © 2005