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

Added terrain correction (minimizing average difference between images

and model)
parent 85bebb08
...@@ -796,6 +796,7 @@ min_str_neib_fpn 0.35 ...@@ -796,6 +796,7 @@ min_str_neib_fpn 0.35
public double terr_boost_parallax = 3.0; // public double terr_boost_parallax = 3.0; //
public double terr_max_parallax = 10.0; // parallax limit when evaluating boost parallax 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_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_reg_weights = 0.25; // fraction of the total weight used for regularization
public double terr_lambda = 5.0; // public double terr_lambda = 5.0; //
public double terr_lambda_scale_good = 0.5; public double terr_lambda_scale_good = 0.5;
...@@ -2068,6 +2069,7 @@ min_str_neib_fpn 0.35 ...@@ -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("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("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("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("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."); gd.addNumericField("Initial lambda", terr_lambda, 5,7,"", "Initial LMA lambda.");
...@@ -2776,6 +2778,7 @@ min_str_neib_fpn 0.35 ...@@ -2776,6 +2778,7 @@ min_str_neib_fpn 0.35
terr_boost_parallax = gd.getNextNumber();// double terr_boost_parallax = gd.getNextNumber();// double
terr_max_parallax = gd.getNextNumber();// double terr_max_parallax = gd.getNextNumber();// double
terr_hifreq_weight = gd.getNextNumber();// double terr_hifreq_weight = gd.getNextNumber();// double
terr_terr_corr = gd.getNextNumber();// double
terr_reg_weights = gd.getNextNumber();// double terr_reg_weights = gd.getNextNumber();// double
terr_lambda = gd.getNextNumber();// double terr_lambda = gd.getNextNumber();// double
terr_lambda_scale_good = gd.getNextNumber();// double terr_lambda_scale_good = gd.getNextNumber();// double
...@@ -3452,6 +3455,7 @@ min_str_neib_fpn 0.35 ...@@ -3452,6 +3455,7 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"terr_boost_parallax", terr_boost_parallax+""); // double properties.setProperty(prefix+"terr_boost_parallax", terr_boost_parallax+""); // double
properties.setProperty(prefix+"terr_max_parallax", terr_max_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_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_reg_weights", terr_reg_weights+""); // double
properties.setProperty(prefix+"terr_lambda", terr_lambda+""); // double properties.setProperty(prefix+"terr_lambda", terr_lambda+""); // double
properties.setProperty(prefix+"terr_lambda_scale_good", terr_lambda_scale_good+""); // double properties.setProperty(prefix+"terr_lambda_scale_good", terr_lambda_scale_good+""); // double
...@@ -4150,8 +4154,8 @@ min_str_neib_fpn 0.35 ...@@ -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_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_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_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_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")!= 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")); 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 ...@@ -4817,6 +4821,7 @@ min_str_neib_fpn 0.35
imp.terr_boost_parallax = this.terr_boost_parallax; imp.terr_boost_parallax = this.terr_boost_parallax;
imp.terr_max_parallax = this.terr_max_parallax; imp.terr_max_parallax = this.terr_max_parallax;
imp.terr_hifreq_weight = this.terr_hifreq_weight; 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_reg_weights = this.terr_reg_weights;
imp.terr_lambda = this.terr_lambda; imp.terr_lambda = this.terr_lambda;
imp.terr_lambda_scale_good = this.terr_lambda_scale_good; imp.terr_lambda_scale_good = this.terr_lambda_scale_good;
......
...@@ -1421,6 +1421,7 @@ public class VegetationModel { ...@@ -1421,6 +1421,7 @@ public class VegetationModel {
double boost_parallax = clt_parameters.imp.terr_boost_parallax; // 3.0; /// 1.0; /////// 5.0; /// 1.0; // 5; double boost_parallax = clt_parameters.imp.terr_boost_parallax; // 3.0; /// 1.0; /////// 5.0; /// 1.0; // 5;
double max_parallax = clt_parameters.imp.terr_max_parallax; // 10; double max_parallax = clt_parameters.imp.terr_max_parallax; // 10;
double hifreq_weight = clt_parameters.imp.terr_hifreq_weight; // 22.5; // 0 - do not use high-freq. Relative weight of laplacian components double reg_weights = 0.25; // fraction of the total weight used for regularization double hifreq_weight = clt_parameters.imp.terr_hifreq_weight; // 22.5; // 0 - do not use high-freq. Relative weight of laplacian components double reg_weights = 0.25; // fraction of the total weight used for regularization
double terrain_correction= clt_parameters.imp.terr_terr_corr;
boolean fit_terr = clt_parameters.imp.terr_fit_terr; // true; // adjust terrain pixels boolean fit_terr = clt_parameters.imp.terr_fit_terr; // true; // adjust terrain pixels
boolean fit_veget = clt_parameters.imp.terr_fit_veget; // true; // adjust vegetation pixels boolean fit_veget = clt_parameters.imp.terr_fit_veget; // true; // adjust vegetation pixels
...@@ -1938,6 +1939,7 @@ public class VegetationModel { ...@@ -1938,6 +1939,7 @@ public class VegetationModel {
elevation_radius, // final double elevation_radius, // Radius of elevation/vegetation influence. elevation_radius, // final double elevation_radius, // Radius of elevation/vegetation influence.
default_alpha, // final double default_alpha, default_alpha, // final double default_alpha,
hifreq_weight, //final double hifreq_weight, // 22.5 0 - do not use high-freq. Relative weight of laplacian components hifreq_weight, //final double hifreq_weight, // 22.5 0 - do not use high-freq. Relative weight of laplacian components
terrain_correction,// final double terrain_correction,
fit_terr, // final boolean adjust_terr, fit_terr, // final boolean adjust_terr,
fit_veget, // final boolean adjust_veget, fit_veget, // final boolean adjust_veget,
fit_alpha, // final boolean adjust_alpha, fit_alpha, // final boolean adjust_alpha,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment