Commit 5a10b665 authored by Andrey Filippov's avatar Andrey Filippov
Browse files

Added terrain correction (minimizing average difference between images

and model)
parent 85bebb08
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -796,6 +796,7 @@ min_str_neib_fpn 0.35
	public double    terr_boost_parallax =     3.0;  //
	public double    terr_max_parallax =      10.0;  // parallax limit when evaluating boost parallax
	public double    terr_hifreq_weight =     10.0; // 22.5; //  0 - do not use high-freq. Relative weight of laplacian components differfences to the DC ones
	public double    terr_terr_corr =          1.0; // relative weight of average mismatch between images and model (terrain corrections)
	public double    terr_reg_weights =        0.25; // fraction of the total weight used for regularization
	public double    terr_lambda =             5.0;  // 
	public double    terr_lambda_scale_good =  0.5;
@@ -2068,6 +2069,7 @@ min_str_neib_fpn 0.35
		gd.addNumericField("Boost parallax",       terr_boost_parallax, 5,7,"",	"Increase weight of scenes that have high parallax to the reference one.");
		gd.addNumericField("Limit parallax",       terr_max_parallax, 5,7,"",	"Parallax limit when evaluating boost parallax.");
		gd.addNumericField("High freq. weight",    terr_hifreq_weight, 5,7,"", 	"Relative weight of laplacian components differfences to the DC ones (0 - do not use).");
		gd.addNumericField("Terrain correction",   terr_terr_corr, 5,7,"",   	"Relative weight of terrain correction (mismatch between average image and average model).");
		
		gd.addNumericField("Losses weight",        terr_reg_weights, 5,7,"", 	"Fraction of other losses compared to the RMSE.");
		gd.addNumericField("Initial lambda",       terr_lambda, 5,7,"", 		"Initial LMA lambda.");
@@ -2776,6 +2778,7 @@ min_str_neib_fpn 0.35
		terr_boost_parallax =      gd.getNextNumber();// double 
		terr_max_parallax =        gd.getNextNumber();// double 
		terr_hifreq_weight =       gd.getNextNumber();// double
		terr_terr_corr =           gd.getNextNumber();// double
		terr_reg_weights =         gd.getNextNumber();// double 
		terr_lambda =              gd.getNextNumber();// double 
		terr_lambda_scale_good =   gd.getNextNumber();// double 
@@ -3452,6 +3455,7 @@ min_str_neib_fpn 0.35
		properties.setProperty(prefix+"terr_boost_parallax",         terr_boost_parallax+"");     // double 
		properties.setProperty(prefix+"terr_max_parallax",           terr_max_parallax+"");       // double 
		properties.setProperty(prefix+"terr_hifreq_weight",          terr_hifreq_weight+"");      // double
		properties.setProperty(prefix+"terr_terr_corr",              terr_terr_corr+"");          // double
		properties.setProperty(prefix+"terr_reg_weights",            terr_reg_weights+"");        // double 
		properties.setProperty(prefix+"terr_lambda",                 terr_lambda+"");             // double 
		properties.setProperty(prefix+"terr_lambda_scale_good",      terr_lambda_scale_good+"");  // double 
@@ -4150,8 +4154,8 @@ min_str_neib_fpn 0.35

		if (properties.getProperty(prefix+"terr_boost_parallax")!=     null) terr_boost_parallax=Double.parseDouble(properties.getProperty(prefix+"terr_boost_parallax"));
		if (properties.getProperty(prefix+"terr_max_parallax")!=       null) terr_max_parallax=Double.parseDouble(properties.getProperty(prefix+"terr_max_parallax"));
		//
		if (properties.getProperty(prefix+"terr_hifreq_weight")!=      null) terr_hifreq_weight=Double.parseDouble(properties.getProperty(prefix+"terr_hifreq_weight"));
		if (properties.getProperty(prefix+"terr_terr_corr")!=          null) terr_terr_corr=Double.parseDouble(properties.getProperty(prefix+"terr_terr_corr"));
		if (properties.getProperty(prefix+"terr_reg_weights")!=        null) terr_reg_weights=Double.parseDouble(properties.getProperty(prefix+"terr_reg_weights"));
		if (properties.getProperty(prefix+"terr_lambda")!=             null) terr_lambda=Double.parseDouble(properties.getProperty(prefix+"terr_lambda"));
		if (properties.getProperty(prefix+"terr_lambda_scale_good")!=  null) terr_lambda_scale_good=Double.parseDouble(properties.getProperty(prefix+"terr_lambda_scale_good"));
@@ -4817,6 +4821,7 @@ min_str_neib_fpn 0.35
		imp.terr_boost_parallax =                this.terr_boost_parallax;                           
		imp.terr_max_parallax =                  this.terr_max_parallax;   
		imp.terr_hifreq_weight =                 this.terr_hifreq_weight;
		imp.terr_terr_corr =                     this.terr_terr_corr;
		imp.terr_reg_weights =                   this.terr_reg_weights;                           
		imp.terr_lambda =                        this.terr_lambda;                           
		imp.terr_lambda_scale_good =             this.terr_lambda_scale_good;