Home > General-Functions > SUGR > Line_2D > sugr_Line_2D_hom2Hes.m

sugr_Line_2D_hom2Hes

PURPOSE ^

% Uncertain Hessian line from homogeneous line

SYNOPSIS ^

function [e,Cee] = sugr_Line_2D_hom2Hes(ul)

DESCRIPTION ^

% Uncertain Hessian line from homogeneous line

 [e,Cee] = sugr_Line_2D_hom2Hes(l)

 * l    =  2D line struct {l.h,l.Crr}

 * e    = line parameters [phi, d]'
 * Cee  = 2 x 2 covariance matrix


 Jochen Meidow, Wolfgang Förstner
 wfoerstn@uni-bonn.de

 See also sugr_Line_2D, sugr_Line_2D_hom2cen,
 sugr_Line_2D_Hes2hom, sugr_Line_2D_Hes2cen, sugr_Line_2D_cen2hom,
 sugr_get_Euclidean_Line_2D, sugr_get_centroid_Line_2D

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% Uncertain Hessian line from homogeneous line
0002 %
0003 % [e,Cee] = sugr_Line_2D_hom2Hes(l)
0004 %
0005 % * l    =  2D line struct {l.h,l.Crr}
0006 %
0007 % * e    = line parameters [phi, d]'
0008 % * Cee  = 2 x 2 covariance matrix
0009 %
0010 %
0011 % Jochen Meidow, Wolfgang Förstner
0012 % wfoerstn@uni-bonn.de
0013 %
0014 % See also sugr_Line_2D, sugr_Line_2D_hom2cen,
0015 % sugr_Line_2D_Hes2hom, sugr_Line_2D_Hes2cen, sugr_Line_2D_cen2hom,
0016 % sugr_get_Euclidean_Line_2D, sugr_get_centroid_Line_2D
0017 
0018 function [e,Cee] = sugr_Line_2D_hom2Hes(ul)
0019 
0020 l   = ul.h;
0021 Cll = sugr_get_CovM_homogeneous_Vector(ul);
0022 
0023 a = l(1);
0024 b = l(2);
0025 c = l(3);
0026 
0027 p   = atan2(b,a);
0028 s2  = a^2+b^2;
0029 s   = sqrt(s2);
0030 d   = -c/s;
0031 e   = [p;d];
0032 
0033 J   = [  -b/s2 ,   a/s2 ,   0  ;...
0034         c*a/s^3, c*b/s^3, -1/s];
0035 
0036 Cee = J*Cll*J';
0037

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