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

sugr_show_Line_2D

PURPOSE ^

% Show/print all representations of 2D line on console

SYNOPSIS ^

function sugr_show_Line_2D(Line_2D,name)

DESCRIPTION ^

% Show/print all representations of 2D line on console

 sugr_show_Line_2D(Line_2D, [name])

 * Line_2D = sugr object, structure 
      .h     = spherically normalized homogeneous coordinates
      .Crr   = reduced covariance matrix
      .Jr    = null space of .h'
 * name = Name of object, optional

 Wolfgang Förstner  1/2011
 wfoerstn@uni-bonn.de

 sw 1/2018

 See also sugr_show_Point_2D, sugr_show_Point_3D, sugr_show_Homography_2D

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% Show/print all representations of 2D line on console
0002 %
0003 % sugr_show_Line_2D(Line_2D, [name])
0004 %
0005 % * Line_2D = sugr object, structure
0006 %      .h     = spherically normalized homogeneous coordinates
0007 %      .Crr   = reduced covariance matrix
0008 %      .Jr    = null space of .h'
0009 % * name = Name of object, optional
0010 %
0011 % Wolfgang Förstner  1/2011
0012 % wfoerstn@uni-bonn.de
0013 %
0014 % sw 1/2018
0015 %
0016 % See also sugr_show_Point_2D, sugr_show_Point_3D, sugr_show_Homography_2D
0017 
0018 function sugr_show_Line_2D(Line_2D,name)
0019 
0020 if nargin<2
0021     name = 'l';
0022 end
0023 
0024 global type_name
0025 
0026 f    = sugr_get_isfinite_Line_2D(Line_2D);
0027 typ_no   = Line_2D.type;
0028 
0029 if f
0030     fprintf('\n%s: finite %s\n',name,type_name{typ_no})
0031 else
0032     fprintf('\n%s: infinite %s\n',name,type_name{typ_no})
0033 end
0034 
0035 
0036 [e,Cee] = sugr_get_Euclidean_Line_2D(Line_2D);
0037 fprintf('\t%s_e =\t%5.3f\t\tCov_ee =\t%5.3f %5.3f\n',name,e(1),Cee(1,1), Cee(1,2))
0038 fprintf('\t\t\t%5.3f\t\t\t\t\t%5.3f %5.3f\n',e(2),Cee(2,1), Cee(2,2))
0039 
0040 h = Line_2D.h;
0041 Chh  = sugr_get_CovM_homogeneous_Vector(Line_2D);
0042 Crr  = Line_2D.Crr;
0043 fprintf('\n\t\t\t%5.3f\t\t\t\t\t%5.3f %5.3f %5.3f\n',h(1),Chh(1,1), Chh(1,2), Chh(1,3))
0044 fprintf('\t%s_h =\t%5.3f\t\tCov_hh =\t%5.3f %5.3f %5.3f\t\tCov_rr =\t%5.3f %5.3f\n',name,h(2),Chh(2,1), Chh(2,2), Chh(2,3), Crr(1,1), Crr(1,2))
0045 fprintf('\t\t\t%5.3f\t\t\t\t\t%5.3f %5.3f %5.3f\t\t\t\t\t%5.3f %5.3f\n',h(3),Chh(3,1), Chh(3,2), Chh(3,3), Crr(2,1), Crr(2,2))
0046 
0047 [x0,phi,sp,sq] = sugr_get_centroid_Line_2D(Line_2D);
0048 fprintf('\n\tx_0 = [%5.3f, %5.3f], phi = %5.3f°, sp = %5.3f°, sq = %5.3f\n',x0,phi*180/pi,sp*180/pi,sq)
0049 
0050 
0051

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