Commit 7739a5cb authored by Andrey Filippov's avatar Andrey Filippov

Working snapshot, will try to improve matching scenes from different

sequences
parent 883c0212
...@@ -793,7 +793,10 @@ min_str_neib_fpn 0.35 ...@@ -793,7 +793,10 @@ min_str_neib_fpn 0.35
public double terr_alpha_init_offs = 0.01; // Initial alpha: opaque/transparent offset from 1.0/0.0 public double terr_alpha_init_offs = 0.01; // Initial alpha: opaque/transparent offset from 1.0/0.0
public double terr_alpha_loss = 100.0; public double terr_alpha_loss = 100.0;
public double terr_alpha_offset = 0.0; public double terr_alpha_offset = 0.1;
public double terr_alpha_min_veg = -1; // old version 0.5; // Minimal vegetation alpha. If (alpha-alpha_offset)/(1-2*alpha_offset) < alpha_min_veg, pull down to lpha_offset
public double terr_alpha_lpf = 2.5; // pull to average of 4 neighbors public double terr_alpha_lpf = 2.5; // pull to average of 4 neighbors
public boolean terr_alpha_piece_linear = true; public boolean terr_alpha_piece_linear = true;
public double terr_alpha_scale_avg = 1.0; // scale average alpha (around 0.5) when pulling to it public double terr_alpha_scale_avg = 1.0; // scale average alpha (around 0.5) when pulling to it
...@@ -2102,6 +2105,8 @@ min_str_neib_fpn 0.35 ...@@ -2102,6 +2105,8 @@ min_str_neib_fpn 0.35
gd.addNumericField("Alpha loss", terr_alpha_loss, 5,7,"", "Alpha quadratic growing loss for when out of [0,1] range"); gd.addNumericField("Alpha loss", terr_alpha_loss, 5,7,"", "Alpha quadratic growing loss for when out of [0,1] range");
gd.addNumericField("Alpha offset", terr_alpha_offset, 5,7,"", "Start alpha losses above 0.0 and below 1.0 by this value."); gd.addNumericField("Alpha offset", terr_alpha_offset, 5,7,"", "Start alpha losses above 0.0 and below 1.0 by this value.");
gd.addNumericField("Minimal vegetation alpha", terr_alpha_min_veg, 5,7,"","Minimal vegetation alpha. If (alpha-alpha_offset)/(1-2*alpha_offset) < alpha_min_veg, pull down to lpha_offset.");
gd.addNumericField("Alpha diffusion", terr_alpha_lpf, 5,7,"", "Alpha diffusion to 4 ortho neighbors."); gd.addNumericField("Alpha diffusion", terr_alpha_lpf, 5,7,"", "Alpha diffusion to 4 ortho neighbors.");
gd.addCheckbox ("Alpha piece-linear", terr_alpha_piece_linear, "Piece-linear alpha (_/\u203E, false - 0.0-cosine-1.0."); gd.addCheckbox ("Alpha piece-linear", terr_alpha_piece_linear, "Piece-linear alpha (_/\u203E, false - 0.0-cosine-1.0.");
gd.addNumericField("Scale alpha", terr_alpha_scale_avg, 5,7,"","Scale target (average of neighbors) alpha before pulling to it (not used now)."); gd.addNumericField("Scale alpha", terr_alpha_scale_avg, 5,7,"","Scale target (average of neighbors) alpha before pulling to it (not used now).");
...@@ -2818,7 +2823,6 @@ min_str_neib_fpn 0.35 ...@@ -2818,7 +2823,6 @@ min_str_neib_fpn 0.35
terr_fit_alpha = gd.getNextBoolean();// boolean terr_fit_alpha = gd.getNextBoolean();// boolean
terr_fit_scenes = gd.getNextBoolean();// boolean terr_fit_scenes = gd.getNextBoolean();// boolean
terr_fit_elevations = gd.getNextBoolean();// boolean terr_fit_elevations = gd.getNextBoolean();// boolean
for (int i = 0; i < terr_fit_disable.length; i++) { for (int i = 0; i < terr_fit_disable.length; i++) {
terr_fit_disable[i] = gd.getNextBoolean();// boolean terr_fit_disable[i] = gd.getNextBoolean();// boolean
} }
...@@ -2847,6 +2851,7 @@ min_str_neib_fpn 0.35 ...@@ -2847,6 +2851,7 @@ min_str_neib_fpn 0.35
terr_alpha_loss = gd.getNextNumber();// double terr_alpha_loss = gd.getNextNumber();// double
terr_alpha_offset = gd.getNextNumber();// double terr_alpha_offset = gd.getNextNumber();// double
terr_alpha_min_veg = gd.getNextNumber();// double
terr_alpha_lpf = gd.getNextNumber();// double terr_alpha_lpf = gd.getNextNumber();// double
terr_alpha_piece_linear = gd.getNextBoolean();// boolean terr_alpha_piece_linear = gd.getNextBoolean();// boolean
terr_alpha_scale_avg = gd.getNextNumber();// double terr_alpha_scale_avg = gd.getNextNumber();// double
...@@ -3557,6 +3562,7 @@ min_str_neib_fpn 0.35 ...@@ -3557,6 +3562,7 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"terr_alpha_loss", terr_alpha_loss+""); // double properties.setProperty(prefix+"terr_alpha_loss", terr_alpha_loss+""); // double
properties.setProperty(prefix+"terr_alpha_offset", terr_alpha_offset+""); // double properties.setProperty(prefix+"terr_alpha_offset", terr_alpha_offset+""); // double
properties.setProperty(prefix+"terr_alpha_min_veg", terr_alpha_min_veg+""); // double
properties.setProperty(prefix+"terr_alpha_lpf", terr_alpha_lpf+""); // double properties.setProperty(prefix+"terr_alpha_lpf", terr_alpha_lpf+""); // double
properties.setProperty(prefix+"terr_alpha_piece_linear", terr_alpha_piece_linear+""); // boolean properties.setProperty(prefix+"terr_alpha_piece_linear", terr_alpha_piece_linear+""); // boolean
properties.setProperty(prefix+"terr_alpha_scale_avg", terr_alpha_scale_avg+""); // double properties.setProperty(prefix+"terr_alpha_scale_avg", terr_alpha_scale_avg+""); // double
...@@ -4284,6 +4290,7 @@ min_str_neib_fpn 0.35 ...@@ -4284,6 +4290,7 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"terr_alpha_loss")!= null) terr_alpha_loss=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_loss")); if (properties.getProperty(prefix+"terr_alpha_loss")!= null) terr_alpha_loss=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_loss"));
if (properties.getProperty(prefix+"terr_alpha_offset")!= null) terr_alpha_offset=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_offset")); if (properties.getProperty(prefix+"terr_alpha_offset")!= null) terr_alpha_offset=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_offset"));
if (properties.getProperty(prefix+"terr_alpha_min_veg")!= null) terr_alpha_min_veg=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_min_veg"));
if (properties.getProperty(prefix+"terr_alpha_lpf")!= null) terr_alpha_lpf=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_lpf")); if (properties.getProperty(prefix+"terr_alpha_lpf")!= null) terr_alpha_lpf=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_lpf"));
if (properties.getProperty(prefix+"terr_alpha_piece_linear")!= null) terr_alpha_piece_linear=Boolean.parseBoolean(properties.getProperty(prefix+"terr_alpha_piece_linear")); if (properties.getProperty(prefix+"terr_alpha_piece_linear")!= null) terr_alpha_piece_linear=Boolean.parseBoolean(properties.getProperty(prefix+"terr_alpha_piece_linear"));
if (properties.getProperty(prefix+"terr_alpha_scale_avg")!= null) terr_alpha_scale_avg=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_scale_avg")); if (properties.getProperty(prefix+"terr_alpha_scale_avg")!= null) terr_alpha_scale_avg=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_scale_avg"));
...@@ -4976,7 +4983,8 @@ min_str_neib_fpn 0.35 ...@@ -4976,7 +4983,8 @@ min_str_neib_fpn 0.35
imp.terr_alpha_init_offs = this.terr_alpha_init_offs; imp.terr_alpha_init_offs = this.terr_alpha_init_offs;
imp.terr_alpha_loss = this.terr_alpha_loss; imp.terr_alpha_loss = this.terr_alpha_loss;
imp.terr_alpha_offset = this.terr_alpha_offset; imp.terr_alpha_offset = this.terr_alpha_offset;
imp.terr_alpha_min_veg = this.terr_alpha_min_veg;
imp.terr_alpha_lpf = this.terr_alpha_lpf; imp.terr_alpha_lpf = this.terr_alpha_lpf;
imp.terr_alpha_piece_linear = this.terr_alpha_piece_linear; imp.terr_alpha_piece_linear = this.terr_alpha_piece_linear;
imp.terr_alpha_scale_avg = this.terr_alpha_scale_avg; imp.terr_alpha_scale_avg = this.terr_alpha_scale_avg;
......
...@@ -1428,6 +1428,8 @@ public class VegetationModel { ...@@ -1428,6 +1428,8 @@ public class VegetationModel {
double default_alpha = clt_parameters.imp.terr_alpha_dflt; // 0.5; // 0.8; double default_alpha = clt_parameters.imp.terr_alpha_dflt; // 0.5; // 0.8;
double alpha_loss = clt_parameters.imp.terr_alpha_loss; //100.0; // 10.0; /// 100.0; // 10.0; // 10000.0; // 1000.0; // 100.; // 10.0; // quadratic loss when alpha reaches -1.0 or 2.0 double alpha_loss = clt_parameters.imp.terr_alpha_loss; //100.0; // 10.0; /// 100.0; // 10.0; // 10000.0; // 1000.0; // 100.; // 10.0; // quadratic loss when alpha reaches -1.0 or 2.0
double alpha_offset = clt_parameters.imp.terr_alpha_offset; // 0.0; // 0.02; // 0.03; // if >0, start losses above 0.0 and below 1.0; double alpha_offset = clt_parameters.imp.terr_alpha_offset; // 0.0; // 0.02; // 0.03; // if >0, start losses above 0.0 and below 1.0;
double alpha_min_veg = clt_parameters.imp.terr_alpha_min_veg; // 0.5 // Minimal vegetation alpha. If (alpha-alpha_offset)/(1-2*alpha_offset) < alpha_min_veg, pull down to lpha_offset
double alpha_lpf = clt_parameters.imp.terr_alpha_lpf; // 2.5; // 5; /// 2; // 5; /// 10; /// 15; // 10.0; // 5.0; // 10.0; // 3; // 10; // 20; // 6.0; // 3.0; // 2.0; // 1.5; // 5.0; // 0.5; // pull to average of 4 neighbors double alpha_lpf = clt_parameters.imp.terr_alpha_lpf; // 2.5; // 5; /// 2; // 5; /// 10; /// 15; // 10.0; // 5.0; // 10.0; // 3; // 10; // 20; // 6.0; // 3.0; // 2.0; // 1.5; // 5.0; // 0.5; // pull to average of 4 neighbors
boolean alpha_piece_linear =clt_parameters.imp.terr_alpha_piece_linear; // true; // false; // true; boolean alpha_piece_linear =clt_parameters.imp.terr_alpha_piece_linear; // true; // false; // true;
double alpha_scale_avg = clt_parameters.imp.terr_alpha_scale_avg; // 1.0; // 1.1; // 0.9; // 2.0; // 1.5; // scale average alpha (around 0.5) when pulling to it double alpha_scale_avg = clt_parameters.imp.terr_alpha_scale_avg; // 1.0; // 1.1; // 0.9; // 2.0; // 1.5; // scale average alpha (around 0.5) when pulling to it
...@@ -2007,6 +2009,7 @@ public class VegetationModel { ...@@ -2007,6 +2009,7 @@ public class VegetationModel {
reg_weights, // final double reg_weights, // fraction of the total weight used for regularization reg_weights, // final double reg_weights, // fraction of the total weight used for regularization
alpha_loss, // final double alpha_loss, // quadratic loss when alpha reaches -1.0 or 2.0 alpha_loss, // final double alpha_loss, // quadratic loss when alpha reaches -1.0 or 2.0
alpha_offset, // final double alpha_offset, // quadratic loss when alpha reaches -1.0 or 2.0 alpha_offset, // final double alpha_offset, // quadratic loss when alpha reaches -1.0 or 2.0
alpha_min_veg, //final double alpha_min_veg, // 0.5; // if (alpha-alpha_offset)/(1-2*alpha_offset) < alpha_min_veg, pull down to lpha_offset
alpha_lpf, // final double alpha_lpf, // pull to average of 4 neighbors alpha_lpf, // final double alpha_lpf, // pull to average of 4 neighbors
alpha_piece_linear, // final boolean alpha_piece_linear, // true - piece-linear, false - half-cosine alpha_piece_linear, // final boolean alpha_piece_linear, // true - piece-linear, false - half-cosine
alpha_scale_avg, // final double alpha_scale_avg, // = 1.2; // scale average alpha (around 0.5) when pulling to it alpha_scale_avg, // final double alpha_scale_avg, // = 1.2; // scale average alpha (around 0.5) when pulling to it
......
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