Home > 16-Surface-Reconstruction > Surface-Reconstruction > 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 clearvars
0012 
0013 addpath(genpath('../../General-Functions/'));
0014 addpath('Functions')
0015 addpath('Data')
0016 
0017 %% set parameters
0018 
0019 init_rand = 6;             % init random generator - may be changed for other example
0020 
0021 % resolution (number of surface grid elements at longer side)
0022 resolution = 40;       % five times faster
0023 resolution = 90;       % as in figure
0024 
0025 % estimation
0026 type_robust = 2;           % 0 not robust / 1 only dem / 2 only points / 3 both
0027 out_C = 0;                 % 0 no covariance matrix as output / 1 covariance matrix as output
0028 
0029 % output settings
0030 print_type = 1;
0031 plot_type  = 0;
0032 
0033 %% plot settings
0034 ss = plot_init;
0035 
0036 %% initialize random number generation by fixed seed
0037 init_rand_seed(init_rand);
0038 
0039 %% ---------------------- LETS GO -----------------------------------------
0040 
0041 disp('-----------------------------------------------------------------------------------------------------')
0042 disp('----- Fig. 16.23: Reconstruction of the surface of a facade - dem from bundle adjustment result -----')
0043 disp('-----------------------------------------------------------------------------------------------------')
0044 
0045 display(['Number of grid points along longer side: ',num2str(resolution)])
0046 display(' ')
0047 
0048 %% generate dem point cloud
0049 [points,BB,delta_x,sigma_k,tmp] = ...
0050     simulate_points_dem_10('fa2_aurelo_result_pyra0_ausgeschnitten-1.ply',resolution);
0051 
0052 %% interpolate
0053 starttime = cputime;
0054 out_in = ones(size(points,1),1);
0055 [ds,S,Sigma,Np,Nr,Mc,ver,A,w,w_f,W] = smooth_dem_robust_bilinear...
0056     (points,BB,delta_x,sigma_k,out_C,type_robust,out_in,print_type,plot_type);
0057 disp(['      complete time for solution: ',num2str(cputime-starttime)])
0058 
0059 %% plot
0060 
0061 figure('name','Fig 16.23 dem from bundle adjustment result','color','w',...
0062     'Position',[0.5*ss(1),0.3*ss(2),0.4*ss(1),0.5*ss(2)]);
0063 plot_surface(ds,BB,delta_x,'plotfun',@mesh,'view',[12,30]);
0064 axis equal;axis off;
0065 title('fitted dem - min curvature$^2$','FontSize',16)
0066 
0067

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