% Uncertain homogenous line parameters from uncertain centered line parameters [h,Chh] = sugr_Line_2D_cen2hom(x0,p,sp,sq) * x = centroid, [x-coord. y-coord.]' * p = direction of normal * sp = standard deviation of normal direction * sq = standard deviation across line * h = homogeneous vector * Chh = CovM Wolfgang Förstner 1/2011 wfoerstn@uni-bonn.de See also sugr_Line_2D, sugr_Line_2D_hom2Hes, sugr_Line_2D_hom2cen, sugr_Line_2D_Hes2hom, sugr_Line_2D_Hes2cen, sugr_get_Euclidean_Line_2D, sugr_get_centroid_Line_2D
0001 %% Uncertain homogenous line parameters from uncertain centered line parameters 0002 % 0003 % [h,Chh] = sugr_Line_2D_cen2hom(x0,p,sp,sq) 0004 % 0005 % * x = centroid, [x-coord. y-coord.]' 0006 % * p = direction of normal 0007 % * sp = standard deviation of normal direction 0008 % * sq = standard deviation across line 0009 % 0010 % * h = homogeneous vector 0011 % * Chh = CovM 0012 % 0013 % Wolfgang Förstner 1/2011 0014 % wfoerstn@uni-bonn.de 0015 % 0016 % See also sugr_Line_2D, sugr_Line_2D_hom2Hes, sugr_Line_2D_hom2cen, 0017 % sugr_Line_2D_Hes2hom, sugr_Line_2D_Hes2cen, 0018 % sugr_get_Euclidean_Line_2D, sugr_get_centroid_Line_2D 0019 0020 function [h,Chh] = sugr_Line_2D_cen2hom(x0,p,sp,sq) 0021 0022 ly = [1,0,0]'; % negative y-axis 0023 Cyy = diag([0,sp^2,sq^2]); % standardized Cov.-Matrix 0024 0025 TR = inv([cos(p),-sin(p),x0(1);... 0026 sin(p), cos(p),x0(2);... 0027 0 , 0 , 1 ]'); % Transformation-matrix 0028 h = TR * ly; %#ok<*MINV> % hom. line 0029 Chh = TR * Cyy * TR'; % error-prop. 0030