Commit 7c77ddba authored by Andrey Filippov's avatar Andrey Filippov

modifying parameters input

parent 214f7e87
...@@ -729,6 +729,7 @@ min_str_neib_fpn 0.35 ...@@ -729,6 +729,7 @@ min_str_neib_fpn 0.35
public String terr_model_path = "/media/elphel/SSD3-4GB/lwir16-proc/berdich3/models/models_1697875868-1697879449-b/1697877487_245877/v35"; public String terr_model_path = "/media/elphel/SSD3-4GB/lwir16-proc/berdich3/models/models_1697875868-1697879449-b/1697877487_245877/v35";
public String terr_model_state = "1697877487_245877-TERR-VEG-STATE"; public String terr_model_state = "1697877487_245877-TERR-VEG-STATE";
public String terr_segments_dir = "sections"; public String terr_segments_dir = "sections";
public String terr_segments_suffix = "-new";
public String terr_par_dir = ""; // directory path to intermediate parameters public String terr_par_dir = ""; // directory path to intermediate parameters
public String terr_par_file = ""; // file name of the intermediate parameters public String terr_par_file = ""; // file name of the intermediate parameters
public boolean terr_par_restore = false; // restore parameters from file public boolean terr_par_restore = false; // restore parameters from file
...@@ -815,6 +816,7 @@ min_str_neib_fpn 0.35 ...@@ -815,6 +816,7 @@ min_str_neib_fpn 0.35
public double terr_elev_lpf = 50.0; // pull elevation to average of 4 neighbors public double terr_elev_lpf = 50.0; // pull elevation to average of 4 neighbors
public double terr_terr_pull0 = 0.1; // pull terrain to initial (pre-adjustment) values public double terr_terr_pull0 = 0.1; // pull terrain to initial (pre-adjustment) values
public double terr_terr_pull_up= 0.25; // pull terrain to initial when it is colder public double terr_terr_pull_up= 0.25; // pull terrain to initial when it is colder
public double terr_terr_pull_avg= 0.1; // Pull terrain to the initial offset by the average offset of all terrain pixels
public double terr_veget_pull0 = 5.0; // pull vegetation initial (pre-adjustment) values public double terr_veget_pull0 = 5.0; // pull vegetation initial (pre-adjustment) values
public double terr_elev_pull0 = 1.0; // pull elevation to initial (pre-adjustment) values public double terr_elev_pull0 = 1.0; // pull elevation to initial (pre-adjustment) values
public boolean terr_elev_alpha_en = false;// Enable loss for low vegetation with high opacity public boolean terr_elev_alpha_en = false;// Enable loss for low vegetation with high opacity
...@@ -2054,7 +2056,8 @@ min_str_neib_fpn 0.35 ...@@ -2054,7 +2056,8 @@ min_str_neib_fpn 0.35
gd.addStringField ("Model path", terr_model_path, 120, "Model directory path with version."); gd.addStringField ("Model path", terr_model_path, 120, "Model directory path with version.");
gd.addStringField ("Model state file", terr_model_state, 50, "Model vegetation source data (w/o extension)."); gd.addStringField ("Model state file", terr_model_state, 50, "Model vegetation source data (w/o extension).");
gd.addStringField ("Segments subdir", terr_segments_dir, 50,"Model vegetation source data (w/o extension)."); gd.addStringField ("Segments subdir", terr_segments_dir, 50,"Model vegetation source data (w/o extension).");
gd.addStringField ("Segments suffix", terr_segments_suffix, 50,"suffix to select from multiple versions (w/o \".par-tiff\".");
gd.addStringField ("Restore directory", terr_par_dir, 120, "Directory to resore initial parameters from."); gd.addStringField ("Restore directory", terr_par_dir, 120, "Directory to resore initial parameters from.");
gd.addStringField ("Restore file", terr_par_file, 120, "Filename to resore initial parameters from."); gd.addStringField ("Restore file", terr_par_file, 120, "Filename to resore initial parameters from.");
gd.addCheckbox ("Restore parameters", terr_par_restore, "Restore initial parameters from file before running LMA."); gd.addCheckbox ("Restore parameters", terr_par_restore, "Restore initial parameters from file before running LMA.");
...@@ -2138,7 +2141,8 @@ min_str_neib_fpn 0.35 ...@@ -2138,7 +2141,8 @@ min_str_neib_fpn 0.35
gd.addNumericField("Vegetation diffusion", terr_veget_lpf, 5,7,"", "LPF for vegetation pixels (diffusion to 4 neighbors)."); gd.addNumericField("Vegetation diffusion", terr_veget_lpf, 5,7,"", "LPF for vegetation pixels (diffusion to 4 neighbors).");
gd.addNumericField("Elevation diffusion", terr_elev_lpf, 5,7,"", "LPF for elevation pixels (diffusion to 4 neighbors)."); gd.addNumericField("Elevation diffusion", terr_elev_lpf, 5,7,"", "LPF for elevation pixels (diffusion to 4 neighbors).");
gd.addNumericField("Terrain pull", terr_terr_pull0, 5,7,"", "Terrain pixels pull to initial (pre-adjustment) values."); gd.addNumericField("Terrain pull", terr_terr_pull0, 5,7,"", "Terrain pixels pull to initial (pre-adjustment) values.");
gd.addNumericField("Terrain pull up", terr_terr_pull_up, 5,7,"", "Terrain pixels pull to initial (pre-adjustment) values when it is colder than initial."); gd.addNumericField("Terrain pull up", terr_terr_pull_up, 5,7,"", "Terrain pixels pull to initial (pre-adjustment) values when it is colder than initial (<0 - sqme as above).");
gd.addNumericField("Terrain pull to average",terr_terr_pull_avg, 5,7,"","Pull terrain to the initial offset by the average offset of all terrain pixels.");
gd.addNumericField("Vegetation pull", terr_veget_pull0, 5,7,"", "Vegetation pixels pull initial (pre-adjustment) values."); gd.addNumericField("Vegetation pull", terr_veget_pull0, 5,7,"", "Vegetation pixels pull initial (pre-adjustment) values.");
gd.addNumericField("Elevation pull", terr_elev_pull0, 5,7,"", "Elevation pixels pull to initial (pre-adjustment) values."); gd.addNumericField("Elevation pull", terr_elev_pull0, 5,7,"", "Elevation pixels pull to initial (pre-adjustment) values.");
...@@ -2824,7 +2828,7 @@ min_str_neib_fpn 0.35 ...@@ -2824,7 +2828,7 @@ min_str_neib_fpn 0.35
terr_model_path = gd.getNextString(); terr_model_path = gd.getNextString();
terr_model_state = gd.getNextString(); terr_model_state = gd.getNextString();
terr_segments_dir = gd.getNextString(); terr_segments_dir = gd.getNextString();
terr_segments_suffix = gd.getNextString();
terr_par_dir = gd.getNextString(); terr_par_dir = gd.getNextString();
terr_par_file = gd.getNextString(); terr_par_file = gd.getNextString();
terr_par_restore = gd.getNextBoolean(); // boolean terr_par_restore = gd.getNextBoolean(); // boolean
...@@ -2898,6 +2902,7 @@ min_str_neib_fpn 0.35 ...@@ -2898,6 +2902,7 @@ min_str_neib_fpn 0.35
terr_elev_lpf = gd.getNextNumber();// double terr_elev_lpf = gd.getNextNumber();// double
terr_terr_pull0 = gd.getNextNumber();// double terr_terr_pull0 = gd.getNextNumber();// double
terr_terr_pull_up = gd.getNextNumber();// double terr_terr_pull_up = gd.getNextNumber();// double
terr_terr_pull_avg = gd.getNextNumber();// double
terr_veget_pull0 = gd.getNextNumber();// double terr_veget_pull0 = gd.getNextNumber();// double
terr_elev_pull0 = gd.getNextNumber();// double terr_elev_pull0 = gd.getNextNumber();// double
terr_elev_alpha_en = gd.getNextBoolean();// boolean terr_elev_alpha_en = gd.getNextBoolean();// boolean
...@@ -3541,6 +3546,7 @@ min_str_neib_fpn 0.35 ...@@ -3541,6 +3546,7 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"terr_model_path", terr_model_path+""); // String properties.setProperty(prefix+"terr_model_path", terr_model_path+""); // String
properties.setProperty(prefix+"terr_model_state", terr_model_state+""); // String properties.setProperty(prefix+"terr_model_state", terr_model_state+""); // String
properties.setProperty(prefix+"terr_segments_dir", terr_segments_dir+""); // String properties.setProperty(prefix+"terr_segments_dir", terr_segments_dir+""); // String
properties.setProperty(prefix+"terr_segments_suffix", terr_segments_suffix+""); // String
properties.setProperty(prefix+"terr_par_dir", terr_par_dir+""); // String properties.setProperty(prefix+"terr_par_dir", terr_par_dir+""); // String
properties.setProperty(prefix+"terr_par_file", terr_par_file+""); // String properties.setProperty(prefix+"terr_par_file", terr_par_file+""); // String
...@@ -3616,6 +3622,7 @@ min_str_neib_fpn 0.35 ...@@ -3616,6 +3622,7 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"terr_elev_lpf", terr_elev_lpf+""); // double properties.setProperty(prefix+"terr_elev_lpf", terr_elev_lpf+""); // double
properties.setProperty(prefix+"terr_terr_pull0", terr_terr_pull0+""); // double properties.setProperty(prefix+"terr_terr_pull0", terr_terr_pull0+""); // double
properties.setProperty(prefix+"terr_terr_pull_up", terr_terr_pull_up+""); // double properties.setProperty(prefix+"terr_terr_pull_up", terr_terr_pull_up+""); // double
properties.setProperty(prefix+"terr_terr_pull_avg", terr_terr_pull_avg+""); // double
properties.setProperty(prefix+"terr_veget_pull0", terr_veget_pull0+""); // double properties.setProperty(prefix+"terr_veget_pull0", terr_veget_pull0+""); // double
properties.setProperty(prefix+"terr_elev_pull0", terr_elev_pull0+""); // double properties.setProperty(prefix+"terr_elev_pull0", terr_elev_pull0+""); // double
properties.setProperty(prefix+"terr_elev_alpha_en", terr_elev_alpha_en+""); // boolean properties.setProperty(prefix+"terr_elev_alpha_en", terr_elev_alpha_en+""); // boolean
...@@ -4282,6 +4289,7 @@ min_str_neib_fpn 0.35 ...@@ -4282,6 +4289,7 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"terr_model_path")!= null) terr_model_path=(String) properties.getProperty(prefix+"terr_model_path"); if (properties.getProperty(prefix+"terr_model_path")!= null) terr_model_path=(String) properties.getProperty(prefix+"terr_model_path");
if (properties.getProperty(prefix+"terr_model_state")!= null) terr_model_state=(String) properties.getProperty(prefix+"terr_model_state"); if (properties.getProperty(prefix+"terr_model_state")!= null) terr_model_state=(String) properties.getProperty(prefix+"terr_model_state");
if (properties.getProperty(prefix+"terr_segments_dir")!= null) terr_segments_dir=(String) properties.getProperty(prefix+"terr_segments_dir"); if (properties.getProperty(prefix+"terr_segments_dir")!= null) terr_segments_dir=(String) properties.getProperty(prefix+"terr_segments_dir");
if (properties.getProperty(prefix+"terr_segments_suffix")!= null) terr_segments_suffix=(String) properties.getProperty(prefix+"terr_segments_suffix");
if (properties.getProperty(prefix+"terr_par_dir")!= null) terr_par_dir=(String) properties.getProperty(prefix+"terr_par_dir"); if (properties.getProperty(prefix+"terr_par_dir")!= null) terr_par_dir=(String) properties.getProperty(prefix+"terr_par_dir");
if (properties.getProperty(prefix+"terr_par_file")!= null) terr_par_file=(String) properties.getProperty(prefix+"terr_par_file"); if (properties.getProperty(prefix+"terr_par_file")!= null) terr_par_file=(String) properties.getProperty(prefix+"terr_par_file");
...@@ -4355,6 +4363,7 @@ min_str_neib_fpn 0.35 ...@@ -4355,6 +4363,7 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"terr_elev_lpf")!= null) terr_elev_lpf=Double.parseDouble(properties.getProperty(prefix+"terr_elev_lpf")); if (properties.getProperty(prefix+"terr_elev_lpf")!= null) terr_elev_lpf=Double.parseDouble(properties.getProperty(prefix+"terr_elev_lpf"));
if (properties.getProperty(prefix+"terr_terr_pull0")!= null) terr_terr_pull0=Double.parseDouble(properties.getProperty(prefix+"terr_terr_pull0")); if (properties.getProperty(prefix+"terr_terr_pull0")!= null) terr_terr_pull0=Double.parseDouble(properties.getProperty(prefix+"terr_terr_pull0"));
if (properties.getProperty(prefix+"terr_terr_pull_up")!= null) terr_terr_pull_up=Double.parseDouble(properties.getProperty(prefix+"terr_terr_pull_up")); if (properties.getProperty(prefix+"terr_terr_pull_up")!= null) terr_terr_pull_up=Double.parseDouble(properties.getProperty(prefix+"terr_terr_pull_up"));
if (properties.getProperty(prefix+"terr_terr_pull_avg")!= null) terr_terr_pull_avg=Double.parseDouble(properties.getProperty(prefix+"terr_terr_pull_avg"));
if (properties.getProperty(prefix+"terr_veget_pull0")!= null) terr_veget_pull0=Double.parseDouble(properties.getProperty(prefix+"terr_veget_pull0")); if (properties.getProperty(prefix+"terr_veget_pull0")!= null) terr_veget_pull0=Double.parseDouble(properties.getProperty(prefix+"terr_veget_pull0"));
if (properties.getProperty(prefix+"terr_elev_pull0")!= null) terr_elev_pull0=Double.parseDouble(properties.getProperty(prefix+"terr_elev_pull0")); if (properties.getProperty(prefix+"terr_elev_pull0")!= null) terr_elev_pull0=Double.parseDouble(properties.getProperty(prefix+"terr_elev_pull0"));
if (properties.getProperty(prefix+"terr_elev_alpha_en")!= null) terr_elev_alpha_en=Boolean.parseBoolean(properties.getProperty(prefix+"terr_elev_alpha_en")); if (properties.getProperty(prefix+"terr_elev_alpha_en")!= null) terr_elev_alpha_en=Boolean.parseBoolean(properties.getProperty(prefix+"terr_elev_alpha_en"));
...@@ -4993,11 +5002,12 @@ min_str_neib_fpn 0.35 ...@@ -4993,11 +5002,12 @@ min_str_neib_fpn 0.35
imp.terr_model_path = this. terr_model_path; imp.terr_model_path = this. terr_model_path;
imp.terr_model_state = this. terr_model_state; imp.terr_model_state = this. terr_model_state;
imp.terr_segments_dir = this. terr_segments_dir; imp.terr_segments_dir = this. terr_segments_dir;
imp.terr_segments_suffix = this.terr_segments_suffix;
imp.terr_par_dir = this. terr_par_dir; imp.terr_par_dir = this. terr_par_dir;
imp.terr_par_file = this. terr_par_file; imp.terr_par_file = this. terr_par_file;
imp.terr_par_restore = this.terr_par_restore; imp.terr_par_restore = this.terr_par_restore;
imp.terr_step_restore = this.terr_step_restore; imp.terr_step_restore = this.terr_step_restore;
imp.terr_um_en = this.terr_um_en; imp.terr_um_en = this.terr_um_en;
imp.terr_um_sigma = this.terr_um_sigma; imp.terr_um_sigma = this.terr_um_sigma;
...@@ -5064,6 +5074,7 @@ min_str_neib_fpn 0.35 ...@@ -5064,6 +5074,7 @@ min_str_neib_fpn 0.35
imp.terr_elev_lpf = this.terr_elev_lpf; imp.terr_elev_lpf = this.terr_elev_lpf;
imp.terr_terr_pull0 = this.terr_terr_pull0; imp.terr_terr_pull0 = this.terr_terr_pull0;
imp.terr_terr_pull_up = this.terr_terr_pull_up; imp.terr_terr_pull_up = this.terr_terr_pull_up;
imp.terr_terr_pull_avg = this.terr_terr_pull_avg;
imp.terr_veget_pull0 = this.terr_veget_pull0; imp.terr_veget_pull0 = this.terr_veget_pull0;
imp.terr_elev_pull0 = this.terr_elev_pull0; imp.terr_elev_pull0 = this.terr_elev_pull0;
imp.terr_elev_alpha_en = this.terr_elev_alpha_en; imp.terr_elev_alpha_en = this.terr_elev_alpha_en;
......
...@@ -7,13 +7,20 @@ public class VegetationSegment { ...@@ -7,13 +7,20 @@ public class VegetationSegment {
public Rectangle woi; public Rectangle woi;
public double [] scene_offsets; public double [] scene_offsets;
public double [][] tva; public double [][] tva;
public double terrain_offset;
public String path;
public VegetationSegment( public VegetationSegment(
String path,
Rectangle woi_veg, Rectangle woi_veg,
Rectangle woi, Rectangle woi,
double terrain_offset,
double [] scene_offsets, // has NaNs double [] scene_offsets, // has NaNs
double [][] tva) { double [][] tva) {
this.path = path;
this.woi = woi; this.woi = woi;
this.woi_veg = woi_veg;
this.scene_offsets = scene_offsets; this.scene_offsets = scene_offsets;
this.tva = tva; this.tva = tva;
this.terrain_offset = terrain_offset;
} }
} }
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