Commit e72b18ee authored by Andrey Filippov's avatar Andrey Filippov

Before converting to dual-band comparison

parent d152fbaa
...@@ -720,6 +720,9 @@ min_str_neib_fpn 0.35 ...@@ -720,6 +720,9 @@ min_str_neib_fpn 0.35
public Color annotate_color_mono = new Color( 255, 180, 50); // reddish over grey public Color annotate_color_mono = new Color( 255, 180, 50); // reddish over grey
public boolean annotate_transparent_mono = false; // // black if not transparent public boolean annotate_transparent_mono = false; // // black if not transparent
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_segments_dir = "sections";
// terrain/vegetation parameters // terrain/vegetation parameters
public boolean terr_um_en = true; public boolean terr_um_en = true;
public double terr_um_sigma = 1.0; public double terr_um_sigma = 1.0;
...@@ -748,6 +751,7 @@ min_str_neib_fpn 0.35 ...@@ -748,6 +751,7 @@ min_str_neib_fpn 0.35
public double terr_alpha_push = 12; // push from alpha==0.5 public double terr_alpha_push = 12; // push from alpha==0.5
public double terr_alpha_push_neutral = 0.5; // alpha point from which push (closer to opaque) public double terr_alpha_push_neutral = 0.5; // alpha point from which push (closer to opaque)
public double terr_alpha_weight_center =1.5; // weight of center alpha pixel relative to each of the 4 ortho ones public double terr_alpha_weight_center =1.5; // weight of center alpha pixel relative to each of the 4 ortho ones
public boolean terr_en_holes = true; // enable small holes // maybe second pass after good fit with vegetation and search for correct offset?
public double terr_alpha_mm_hole = 0.1; // NaN to disable. Local "almost minimum" (lower than this fraction between min and max neighbor) is not subject to alpha_lpf public double terr_alpha_mm_hole = 0.1; // NaN to disable. Local "almost minimum" (lower than this fraction between min and max neighbor) is not subject to alpha_lpf
public double terr_terr_lpf = 0.1; // pull terrain to average of 4 neighbors (very small) public double terr_terr_lpf = 0.1; // pull terrain to average of 4 neighbors (very small)
public double terr_veget_lpf = 0.2; // pull vegetation to average of 4 neighbors (very small - maybe not needed) public double terr_veget_lpf = 0.2; // pull vegetation to average of 4 neighbors (very small - maybe not needed)
...@@ -1949,8 +1953,14 @@ min_str_neib_fpn 0.35 ...@@ -1949,8 +1953,14 @@ min_str_neib_fpn 0.35
gd.addCheckbox ("Transparent timestamp background (monochrome)",this.annotate_transparent_mono, gd.addCheckbox ("Transparent timestamp background (monochrome)",this.annotate_transparent_mono,
"Put monochrome timestamp over image (unchecked - use black background). Color - always black."); "Put monochrome timestamp over image (unchecked - use black background). Color - always black.");
// vegetation // vegetation
gd.addTab("Vegetation","See through foliage parameters"); gd.addTab("Vegetation","See through foliage parameters");
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 ("Segments subdir", terr_segments_dir, 50, "Model vegetation source data (w/o extension).");
gd.addCheckbox ("Enable UM", terr_um_en, "Enable unsharp mask filter."); gd.addCheckbox ("Enable UM", terr_um_en, "Enable unsharp mask filter.");
gd.addNumericField("UM sigma", terr_um_sigma, 5,7, "pix", "Unsharp mask sigma."); gd.addNumericField("UM sigma", terr_um_sigma, 5,7, "pix", "Unsharp mask sigma.");
gd.addNumericField("UM weight", terr_um_weight, 5,7, "", "Unsharp mask weight."); gd.addNumericField("UM weight", terr_um_weight, 5,7, "", "Unsharp mask weight.");
...@@ -1979,6 +1989,7 @@ min_str_neib_fpn 0.35 ...@@ -1979,6 +1989,7 @@ min_str_neib_fpn 0.35
gd.addNumericField("Push alpha", terr_alpha_push, 5,7,"", "Quadratic loss for middle alpha (push to 0.0 or 1.0."); gd.addNumericField("Push alpha", terr_alpha_push, 5,7,"", "Quadratic loss for middle alpha (push to 0.0 or 1.0.");
gd.addNumericField("Neutral alpha", terr_alpha_push_neutral, 5,7,"", "Alpha point from which to push (default 0.5)."); gd.addNumericField("Neutral alpha", terr_alpha_push_neutral, 5,7,"", "Alpha point from which to push (default 0.5).");
gd.addNumericField("Alpha center weight", terr_alpha_weight_center, 5,7,"","Weight of center alpha pixel relative to each of the 4 ortho ones."); gd.addNumericField("Alpha center weight", terr_alpha_weight_center, 5,7,"","Weight of center alpha pixel relative to each of the 4 ortho ones.");
gd.addCheckbox ("Hole search enable", terr_en_holes, "Search for small semi-transparent holes, disable diffusion of local alpha minimums.");
gd.addNumericField("Alpha MM fraction", terr_alpha_mm_hole, 5,7,"", "Disable diffusion for local \"almost minimum\" (lower than this fraction between min and max neighbors)."); gd.addNumericField("Alpha MM fraction", terr_alpha_mm_hole, 5,7,"", "Disable diffusion for local \"almost minimum\" (lower than this fraction between min and max neighbors).");
gd.addNumericField("Terrain diffusion", terr_terr_lpf, 5,7,"", "LPF for terrain pixels (diffusion to 4 neighbors)."); gd.addNumericField("Terrain diffusion", terr_terr_lpf, 5,7,"", "LPF for terrain pixels (diffusion to 4 neighbors).");
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).");
...@@ -2631,6 +2642,9 @@ min_str_neib_fpn 0.35 ...@@ -2631,6 +2642,9 @@ min_str_neib_fpn 0.35
this.annotate_transparent_mono= gd.getNextBoolean(); this.annotate_transparent_mono= gd.getNextBoolean();
// vegetation // vegetation
terr_model_path = gd.getNextString();
terr_model_state = gd.getNextString();
terr_segments_dir = gd.getNextString();
terr_um_en = gd.getNextBoolean();// boolean terr_um_en = gd.getNextBoolean();// boolean
terr_um_sigma = gd.getNextNumber();// double terr_um_sigma = gd.getNextNumber();// double
terr_um_weight = gd.getNextNumber();// double terr_um_weight = gd.getNextNumber();// double
...@@ -2659,6 +2673,8 @@ min_str_neib_fpn 0.35 ...@@ -2659,6 +2673,8 @@ min_str_neib_fpn 0.35
terr_alpha_push = gd.getNextNumber();// double terr_alpha_push = gd.getNextNumber();// double
terr_alpha_push_neutral = gd.getNextNumber();// double terr_alpha_push_neutral = gd.getNextNumber();// double
terr_alpha_weight_center = gd.getNextNumber();// double terr_alpha_weight_center = gd.getNextNumber();// double
terr_en_holes = gd.getNextBoolean();// boolean
terr_alpha_mm_hole = gd.getNextNumber();// double terr_alpha_mm_hole = gd.getNextNumber();// double
terr_terr_lpf = gd.getNextNumber();// double terr_terr_lpf = gd.getNextNumber();// double
terr_veget_lpf = gd.getNextNumber();// double terr_veget_lpf = gd.getNextNumber();// double
...@@ -3279,6 +3295,10 @@ min_str_neib_fpn 0.35 ...@@ -3279,6 +3295,10 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"annotate_transparent_mono",this.annotate_transparent_mono+"");// boolean properties.setProperty(prefix+"annotate_transparent_mono",this.annotate_transparent_mono+"");// boolean
// vegetation // vegetation
properties.setProperty(prefix+"terr_model_path", terr_model_path+""); // 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_um_en", terr_um_en+""); // boolean properties.setProperty(prefix+"terr_um_en", terr_um_en+""); // boolean
properties.setProperty(prefix+"terr_um_sigma", terr_um_sigma+""); // double properties.setProperty(prefix+"terr_um_sigma", terr_um_sigma+""); // double
properties.setProperty(prefix+"terr_um_weight", terr_um_weight+""); // double properties.setProperty(prefix+"terr_um_weight", terr_um_weight+""); // double
...@@ -3305,7 +3325,7 @@ min_str_neib_fpn 0.35 ...@@ -3305,7 +3325,7 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"terr_alpha_push", terr_alpha_push+""); // double properties.setProperty(prefix+"terr_alpha_push", terr_alpha_push+""); // double
properties.setProperty(prefix+"terr_alpha_push_neutral", terr_alpha_push_neutral+""); // double properties.setProperty(prefix+"terr_alpha_push_neutral", terr_alpha_push_neutral+""); // double
properties.setProperty(prefix+"terr_alpha_weight_center", terr_alpha_weight_center+"");// double properties.setProperty(prefix+"terr_alpha_weight_center", terr_alpha_weight_center+"");// double
properties.setProperty(prefix+"terr_alpha_mm_hole", terr_alpha_mm_hole+""); // double properties.setProperty(prefix+"terr_en_holes", terr_en_holes+""); // boolean
properties.setProperty(prefix+"terr_terr_lpf", terr_terr_lpf+""); // double properties.setProperty(prefix+"terr_terr_lpf", terr_terr_lpf+""); // double
properties.setProperty(prefix+"terr_veget_lpf", terr_veget_lpf+""); // double properties.setProperty(prefix+"terr_veget_lpf", terr_veget_lpf+""); // double
properties.setProperty(prefix+"terr_terr_pull0", terr_terr_pull0+""); // double properties.setProperty(prefix+"terr_terr_pull0", terr_terr_pull0+""); // double
...@@ -3948,6 +3968,10 @@ min_str_neib_fpn 0.35 ...@@ -3948,6 +3968,10 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"annotate_transparent_mono")!=null) this.annotate_transparent_mono=Boolean.parseBoolean(properties.getProperty(prefix+"annotate_transparent_mono")); if (properties.getProperty(prefix+"annotate_transparent_mono")!=null) this.annotate_transparent_mono=Boolean.parseBoolean(properties.getProperty(prefix+"annotate_transparent_mono"));
// vegetation // vegetation
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_segments_dir")!= null) terr_segments_dir=(String) properties.getProperty(prefix+"terr_segments_dir");
if (properties.getProperty(prefix+"terr_um_en")!= null) terr_um_en=Boolean.parseBoolean(properties.getProperty(prefix+"terr_um_en")); if (properties.getProperty(prefix+"terr_um_en")!= null) terr_um_en=Boolean.parseBoolean(properties.getProperty(prefix+"terr_um_en"));
if (properties.getProperty(prefix+"terr_um_sigma")!= null) terr_um_sigma=Double.parseDouble(properties.getProperty(prefix+"terr_um_sigma")); if (properties.getProperty(prefix+"terr_um_sigma")!= null) terr_um_sigma=Double.parseDouble(properties.getProperty(prefix+"terr_um_sigma"));
if (properties.getProperty(prefix+"terr_um_weight")!= null) terr_um_weight=Double.parseDouble(properties.getProperty(prefix+"terr_um_weight")); if (properties.getProperty(prefix+"terr_um_weight")!= null) terr_um_weight=Double.parseDouble(properties.getProperty(prefix+"terr_um_weight"));
...@@ -3974,6 +3998,7 @@ min_str_neib_fpn 0.35 ...@@ -3974,6 +3998,7 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"terr_alpha_push")!= null) terr_alpha_push=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_push")); if (properties.getProperty(prefix+"terr_alpha_push")!= null) terr_alpha_push=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_push"));
if (properties.getProperty(prefix+"terr_alpha_push_neutral")!= null) terr_alpha_push_neutral=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_push_neutral")); if (properties.getProperty(prefix+"terr_alpha_push_neutral")!= null) terr_alpha_push_neutral=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_push_neutral"));
if (properties.getProperty(prefix+"terr_alpha_weight_center")!=null) terr_alpha_weight_center=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_weight_center")); if (properties.getProperty(prefix+"terr_alpha_weight_center")!=null) terr_alpha_weight_center=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_weight_center"));
if (properties.getProperty(prefix+"terr_en_holes")!= null) terr_en_holes=Boolean.parseBoolean(properties.getProperty(prefix+"terr_en_holes"));
if (properties.getProperty(prefix+"terr_alpha_mm_hole")!= null) terr_alpha_mm_hole=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_mm_hole")); if (properties.getProperty(prefix+"terr_alpha_mm_hole")!= null) terr_alpha_mm_hole=Double.parseDouble(properties.getProperty(prefix+"terr_alpha_mm_hole"));
if (properties.getProperty(prefix+"terr_terr_lpf")!= null) terr_terr_lpf=Double.parseDouble(properties.getProperty(prefix+"terr_terr_lpf")); if (properties.getProperty(prefix+"terr_terr_lpf")!= null) terr_terr_lpf=Double.parseDouble(properties.getProperty(prefix+"terr_terr_lpf"));
if (properties.getProperty(prefix+"terr_veget_lpf")!= null) terr_veget_lpf=Double.parseDouble(properties.getProperty(prefix+"terr_veget_lpf")); if (properties.getProperty(prefix+"terr_veget_lpf")!= null) terr_veget_lpf=Double.parseDouble(properties.getProperty(prefix+"terr_veget_lpf"));
...@@ -4584,6 +4609,10 @@ min_str_neib_fpn 0.35 ...@@ -4584,6 +4609,10 @@ min_str_neib_fpn 0.35
imp.annotate_transparent_mono = this. annotate_transparent_mono; imp.annotate_transparent_mono = this. annotate_transparent_mono;
// vegetation // vegetation
imp.terr_model_path = this. terr_model_path;
imp.terr_model_state = this. terr_model_state;
imp.terr_segments_dir = this. terr_segments_dir;
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;
imp.terr_um_weight = this.terr_um_weight; imp.terr_um_weight = this.terr_um_weight;
...@@ -4609,7 +4638,8 @@ min_str_neib_fpn 0.35 ...@@ -4609,7 +4638,8 @@ min_str_neib_fpn 0.35
imp.terr_alpha_scale_avg = this.terr_alpha_scale_avg; imp.terr_alpha_scale_avg = this.terr_alpha_scale_avg;
imp.terr_alpha_push = this.terr_alpha_push; imp.terr_alpha_push = this.terr_alpha_push;
imp.terr_alpha_push_neutral = this.terr_alpha_push_neutral; imp.terr_alpha_push_neutral = this.terr_alpha_push_neutral;
imp.terr_alpha_weight_center = this.terr_alpha_weight_center; imp.terr_alpha_weight_center = this.terr_alpha_weight_center;
imp.terr_en_holes = this.terr_en_holes;
imp.terr_alpha_mm_hole = this.terr_alpha_mm_hole; imp.terr_alpha_mm_hole = this.terr_alpha_mm_hole;
imp.terr_terr_lpf = this.terr_terr_lpf; imp.terr_terr_lpf = this.terr_terr_lpf;
imp.terr_veget_lpf = this.terr_veget_lpf; imp.terr_veget_lpf = this.terr_veget_lpf;
......
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