Home > 16-Surfacereconstruction > fig_16_23_aurelo_result.m

fig_16_23_aurelo_result

PURPOSE ^

% Fig. 16.23 page 764

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

% Fig. 16.23 page 764
 Reconstruction of the surface of a facade - dem from bundle adjustment result
 
 Wolfgang Förstner 07/14
 last changes: Wolfgang Förstner 10/16
 wfoerstn@uni-bonn.de, wenzel@igg.uni-bonn.de

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% Fig. 16.23 page 764
0002 % Reconstruction of the surface of a facade - dem from bundle adjustment result
0003 %
0004 % Wolfgang Förstner 07/14
0005 % last changes: Wolfgang Förstner 10/16
0006 % wfoerstn@uni-bonn.de, wenzel@igg.uni-bonn.de
0007 
0008 
0009 close all
0010 clear all
0011 
0012 addpath(genpath('../General_Functions/'));
0013 addpath('Functions')
0014 addpath('Data')
0015 
0016 
0017 %% set parameters
0018 
0019 init_rand = 6;             % init random generator - may be changed for other example
0020 type_data = 10;            % @todo: kann weg?
0021 
0022 % resolution (number of surface grid elements at longer side)
0023 resolution = 40;       % five times faster
0024 %resolution = 90;       % as in figure
0025 
0026 % estimation
0027 type_robust = 2;           % 0 not robust / 1 only dem / 2 only points / 3 both
0028 out_C = 0;                 % 0 no covariance matrix as output / 1 covariance matrix as output
0029 
0030 % output settings
0031 print_type = 0;
0032 plot_type  = 0;
0033 
0034 %% plot settings
0035 ss = plot_init;
0036 
0037 %% initialize random number generation by fixed seed
0038 init_rand_seed(init_rand);
0039 
0040 %% ---------------------- LETS GO -----------------------------------------
0041 
0042 display('----- Fig. 16.23: Reconstruction of the surface of a facade - dem from bundle adjustment result -----')
0043 
0044 %% generate dem point cloud
0045 [points,BB,delta_x,sigma_k,tmp] = ...
0046     simulate_points_dem_10('fa2_aurelo_result_pyra0_ausgeschnitten-1.ply',resolution);
0047 
0048 %% interpolate
0049 starttime = cputime;
0050 out_in = zeros(size(points,1),1);
0051 [ds,S,Sigma,Np,Nr,Mc,ver,A,w,w_f,W] = smooth_dem_robust_bilinear...
0052     (points,BB,delta_x,sigma_k,out_C,type_robust,type_data,out_in,print_type,plot_type);
0053 display(['      complete time for solution: ',num2str(cputime-starttime)])
0054 
0055 %% plot
0056 
0057 figure('name','Fig 16.23 dem from bundle adjustment result','color','w',...
0058     'Position',[0.5*ss(1),0.3*ss(2),0.4*ss(1),0.5*ss(2)]);
0059 plot_surface(ds,BB,delta_x,'plotfun',@mesh,'view',[-70,30]);
0060 axis equal;axis off;
0061 title('fitted dem - min curvature^2','FontSize',16)
0062 
0063

Generated on Sat 01-Oct-2016 21:05:04 by m2html © 2005