Home > 16-Surface-Reconstruction > Surface-Reconstruction > eq_15_120_theoretical_accuracy.m

eq_15_120_theoretical_accuracy

PURPOSE ^

% eq_15_120_theoretical accuracy

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

% eq_15_120_theoretical accuracy

 determines precision as a function of grid spacing
 plots grid and precision (10 levels)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% eq_15_120_theoretical accuracy
0002 %
0003 % determines precision as a function of grid spacing
0004 % plots grid and precision (10 levels)
0005 
0006 % clear all
0007 clearvars
0008 close all
0009 % type_data: type of generated data
0010 % 15     4x4 Grid
0011 %
0012 % wf 7/2014
0013 
0014 addpath(genpath('../../General-Functions'))
0015 addpath('Functions')
0016 addpath('Data')
0017 plot_init;
0018 
0019 disp('--- analyse theoretical precision ---')
0020 
0021 init_rand = 6;
0022 type_robust = 0
0023 %             0 not robust
0024 %             1 only dem
0025 %             2 only points
0026 %             3 both
0027 
0028 out_C = 1;
0029 out_print = 0;
0030 Tol =0.15;
0031 
0032 print_type = 0;
0033 plot_type  = 0;
0034 
0035 init_rand_seed(init_rand);
0036 
0037 %% generate dem point cloud
0038 sigma_z=zeros(10,1);
0039 n=4
0040 d_max=10;
0041 for d=1:d_max
0042     [points,BB,delta_x,sigma_k,sigma_s,out_in,dem]=simulate_points_dem_15_flat(d,n);
0043 
0044     Np = size(points,1);
0045 
0046 
0047     % smooth non-robust
0048 
0049     type_robust=0;
0050 
0051     starttime = cputime
0052     [ds,S,Sigma,Np,Nr,Mc,ver,A,w,w_f,W] =...
0053         smooth_dem_robust_bilinear...
0054         (points,BB,delta_x,sigma_k,out_C,type_robust,out_in,...
0055         print_type,plot_type);
0056     complete_time_for_solution=cputime-starttime
0057 
0058     figure
0059     hold on
0060     mesh(S);
0061     title(strcat('Height = \sigma_z, d=',num2str(2*d)))
0062     view([-33,63])
0063     sigma_centre=sqrt(S(2+(n-1)*d,2+(n-1)*d));
0064     sigma_z(d)=sigma_centre;
0065 end
0066 
0067 std_z=sigma_z'
0068 
0069 figure
0070 hold on
0071 d_range=1:d_max;
0072 plot(2*(1:d_max),sigma_z(1:d_max),'ob','MarkerSize',12)
0073 B=regress(sigma_z(d_range).^2,[ones(length(d_range),1),(2*d_range)'.^2])
0074 plot(2*(1:d_max),sqrt(B(1)+B(2)*(2*(1:d_max))'.^2),'-r','LineWidth',2)
0075 title(strcat('\sigma_z =',num2str(B(1)),' + ',num2str(B(2)),'d, (d > 1)'))

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