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

sugr_get_Euclidean_Line_2D

PURPOSE ^

% Determines Hessian paramters of 2D line

SYNOPSIS ^

function [e,Cee] = sugr_get_Euclidean_Line_2D(l)

DESCRIPTION ^

% Determines Hessian paramters of 2D line

 [e,Cee] = sugr_get_Euclidean_Line_2D(l)

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

 * e = 2-vector with direction of normal and distance (Hessian)
 * Cee = CovM of e

 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_Line_2D_cen2hom,
 sugr_get_centroid_Line_2D

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% Determines Hessian paramters of 2D line
0002 %
0003 % [e,Cee] = sugr_get_Euclidean_Line_2D(l)
0004 %
0005 % * l = 2D line struct, minimal representation {l.h,l.Crr}
0006 %
0007 % * e = 2-vector with direction of normal and distance (Hessian)
0008 % * Cee = CovM of e
0009 %
0010 % Wolfgang Förstner 1/2011
0011 % wfoerstn@uni-bonn.de
0012 %
0013 % See also sugr_Line_2D, sugr_Line_2D_hom2Hes, sugr_Line_2D_hom2cen,
0014 % sugr_Line_2D_Hes2hom, sugr_Line_2D_Hes2cen, sugr_Line_2D_cen2hom,
0015 % sugr_get_centroid_Line_2D
0016 
0017 function [e,Cee] = sugr_get_Euclidean_Line_2D(l)
0018 
0019 switch sugr_get_isfinite_Line_2D(l)
0020     case 0  % infinite line
0021         e   = zeros(2,1);
0022         Cee = zeros(2);
0023     case 1  % finite line
0024         n    = norm(l.h(1:2));                                     % norm
0025         e    = [atan2(l.h(2),l.h(1)),-l.h(3)/n]';                  % Euclidean parameters
0026         J    = 1 / n^3 * ...                                       % J: Jeh * Jhr
0027             [     -n * l.h(2) ,       n * l.h(1) ,  0;   ...
0028             l.h(3) * l.h(1) ,  l.h(3) * l.h(2) , -n^2] ...
0029             * l.Jr;
0030         Cee  = J * l.Crr * J';
0031 end

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