Home > 10-Uncertain-Geometry > Demo-Point-2D > demo_sugr_Point_2D.m

demo_sugr_Point_2D

PURPOSE ^

demo_sugr_Point_2D: demo routine for generating 2D point

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 demo_sugr_Point_2D: demo routine for generating 2D point

 Point_2D = structure 

 *           .h = spherically normalized homogeneous coordinates
 *           .Crr = half vector of reduced covariance matrix
 *           .type = 'Point_2D'

 Wolfgang Förstner
 wfoerstn@uni-bonn.de

 last changes: Susanne Wenzel 06/18
 wenzel@igg.uni-bonn.de

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % demo_sugr_Point_2D: demo routine for generating 2D point
0002 %
0003 % Point_2D = structure
0004 %
0005 % *           .h = spherically normalized homogeneous coordinates
0006 % *           .Crr = half vector of reduced covariance matrix
0007 % *           .type = 'Point_2D'
0008 %
0009 % Wolfgang Förstner
0010 % wfoerstn@uni-bonn.de
0011 %
0012 % last changes: Susanne Wenzel 06/18
0013 % wenzel@igg.uni-bonn.de
0014 
0015 %% initialize sugr
0016 addpath(genpath('../../General-Functions'))
0017 close all; clearvars;clc
0018 sugr_INIT
0019 plot_init;
0020 
0021 %% Sorted according to number of arguments
0022 
0023 %% (1) Euclidean point vector without CovM (==0)
0024 in = [1,2]';
0025 x = sugr_Point_2D(in);
0026 sugr_show_Point_2D(x,'x');
0027 
0028 
0029 %% (1) Homogeneous point vector without CovM (==0)
0030 in = [1,2,3]';
0031 x = sugr_Point_2D(in);
0032 sugr_show_Point_2D(x,'x');
0033 
0034 %% (1) Homogeneous vanishing point vector without CovM (==0)
0035 in = [1,2,0]';
0036 x = sugr_Point_2D(in);
0037 sugr_show_Point_2D(x,'x');
0038 
0039 %% (2) Euclidean point coordinates without CovM (==0)
0040 in1 = 1;
0041 in2 = 2;
0042 x = sugr_Point_2D(in1,in2);
0043 sugr_show_Point_2D(x,'x');
0044 
0045 %% (2) Homogeneous point vector
0046 in1 = [1,2,2]';
0047 in2 = [1,2,1;2,5,0;1,0,7]*0.01;
0048 x = sugr_Point_2D(in1,in2);
0049 sugr_show_Point_2D(x,'x');
0050 
0051 %% (2) Homogeneous vanishing point vector
0052 in1 = [3,4,0]';
0053 in2 = [2,2,0;2,6,0;0,0,5];
0054 x = sugr_Point_2D(in1,in2);
0055 sugr_show_Point_2D(x,'x');
0056 
0057 %% (3) Homogeneous point coordinatens without CM (==0)
0058 in1 = 1;
0059 in2 = 2;
0060 in3 = 2;
0061 x = sugr_Point_2D(in1,in2,in3);
0062 sugr_show_Point_2D(x,'x');
0063 
0064 %% (3) Homogeneous vanishing point coordinates without CM (==0)
0065 in1 = 1;
0066 in2 = 2;
0067 in3 = 0;
0068 x = sugr_Point_2D(in1,in2,in3);
0069 sugr_show_Point_2D(x,'x');
0070 
0071 %% (4) Euclidean point coordinates
0072 in1 = 1;
0073 in2 = 2;
0074 in3 = 0.1;
0075 in4 = 0.2;
0076 x = sugr_Point_2D(in1,in2,in3,in4);
0077 sugr_show_Point_2D(x,'x');
0078 
0079 %% (4) Homogeneous point coordinates
0080 in1 = 1;
0081 in2 = 2;
0082 in3 = 2;
0083 in4 = [1,2,1;...
0084        2,5,0;...
0085        1,0,7]*0.0001;
0086 x1 = sugr_Point_2D(in1,in2,in3,in4);
0087 sugr_show_Point_2D(x,'x_1');
0088 figure('Color','w')
0089 sugr_plot_Point_2D(x1,'-k','-b',2,1);
0090 title('Homogeneous uncertain point')
0091 axis equal
0092 
0093 %% (4) Homogeneous vanishing point coordinates
0094 in1 = 1;
0095 in2 = 2;
0096 in3 = 0;
0097 in4 = [2,2,1;2,5,0;1,0,7]*0.01;
0098 x = sugr_Point_2D(in1,in2,in3,in4);
0099 sugr_show_Point_2D(x,'x');
0100

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