0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 close all
0010 
0011 clearvars
0012 
0013 addpath(genpath('../../General-Functions/'));
0014 addpath('Functions')
0015 addpath('Data')
0016 
0017 
0018 
0019 init_rand = 6;             
0020 
0021 
0022 resolution = 40;       
0023 resolution = 90;       
0024 
0025 
0026 type_robust = 2;           
0027 out_C = 0;                 
0028 
0029 
0030 print_type = 1;
0031 plot_type  = 0;
0032 
0033 
0034 ss = plot_init;
0035 
0036 
0037 init_rand_seed(init_rand);
0038 
0039 
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 
0049 [points,BB,delta_x,sigma_k,tmp] = ...
0050     simulate_points_dem_10('fa2_aurelo_result_pyra0_ausgeschnitten-1.ply',resolution);
0051 
0052 
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 
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