Commit ca780c7c authored by Andrey Filippov's avatar Andrey Filippov

tested jt vs. jt_delta, full modification not finished

parent 91124a2f
......@@ -201,10 +201,18 @@ import ij.process.ImageProcessor;
}
}
}
int height = -1;
for (int slic = 0; slic < dpixels.length; slic++) {
if (dpixels[slic] != null) {
height = dpixels[slic].length/width;
break;
}
}
return showArraysHyperstack(
dpixels, // double[][] pixels,
width, // int width,
pixels[0][0].length/width, // int height,
height, // int height,
pixels[0].length, // int slices,
title, // String title,
combo_titles, // String [] titles);
......
......@@ -746,15 +746,27 @@ min_str_neib_fpn 0.35
public boolean terr_fit_alpha = true; // adjust vegetation alpha pixels
public boolean terr_fit_scenes = true; // adjust scene offsets (start from 0 always?)
public boolean terr_fit_elevations = false; // adjust elevation pixels (not yet implemented)
public double terr_max_warp = 1.8;
public int terr_max_elevation = 22; // maximal offset to consider when looking for vegetation influence
@Deprecated
public int terr_min_scenes = 1; // minimal number of scenes (inside woi) vegetation pixel must influence
@Deprecated
public int terr_min_samples_scene = 10;
@Deprecated
public int terr_min_total_scenes = 2;
@Deprecated
public int terr_min_pixels = 10;
@Deprecated
public boolean terr_warm_veget = true; // start with vegetation warmer than terrain
@Deprecated
public double terr_warmest = 90.0; // above - vegetation. below - terrain
@Deprecated
public double terr_initial_split = 0.1; // initial alpha: terrain 0.0+, vegetation 1.0-
@Deprecated
public double terr_min_split_frac = 0.15; // minimal modality fraction to use split by temperature
public double terr_difference = 100.0; // vegetation is 100 warmer (target)
......@@ -2014,15 +2026,18 @@ min_str_neib_fpn 0.35
gd.addCheckbox ("Adjust scene offsets", terr_fit_scenes, "Adjust scene offsets (start from 0 always?).");
gd.addCheckbox ("Adjust elevation", terr_fit_elevations,"Adjust elevation pixels (not yet implemented).");
gd.addNumericField("Min influenced scenes",terr_min_scenes, 0,3, "", "Minimal number of scenes (inside woi) vegetation pixel must influence.");
gd.addNumericField("Maximal warp", terr_max_warp, 5,7,"pix", "(1.8) Do not use scenes where distance between vegetation projection exceeds this.");
gd.addNumericField("Min elevation/offset", terr_max_elevation, 0,3,"pix","Maximal offset to consider when looking for vegetation influence.");
gd.addNumericField("(Min influenced scenes)",terr_min_scenes, 0,3, "", "Deprecated: Minimal number of scenes (inside woi) vegetation pixel must influence.");
gd.addNumericField("Minimal samples/scene",terr_min_samples_scene, 0,3,"","Minimal samples per scene used for fitting (skip scene if less).");
gd.addNumericField("Minimum scenes used", terr_min_total_scenes, 0,3,"", "Minimal total number of scenes used (skip segment if less).");
gd.addNumericField("Minimal pixels fitted",terr_min_pixels, 0,3,"", "Minimal number of terrain and vegetation pixels used for fitting in this segment(skip segment if less).");
gd.addCheckbox ("Start by temperature", terr_warm_veget, "Start with vegetation warmer than terrain.");
gd.addNumericField("Warmest terrain", terr_warmest, 5,7,"", "Above - vegetation. below - terrain.");
gd.addNumericField("Initial split", terr_initial_split, 5,7,"", "Initial alpha: terrain 0.0+, vegetation 1.0-.");
gd.addNumericField("Min. split fraction", terr_min_split_frac, 5,7,"", "minimal modality fraction to use split by temperature (otherwise use default alpha).");
gd.addCheckbox ("(Start by temperature)", terr_warm_veget, "Start with vegetation warmer than terrain.");
gd.addNumericField("(Warmest terrain)", terr_warmest, 5,7,"", "Above - vegetation. below - terrain.");
gd.addNumericField("(Initial split)", terr_initial_split, 5,7,"", "Initial alpha: terrain 0.0+, vegetation 1.0-.");
gd.addNumericField("(Min. split fraction)", terr_min_split_frac, 5,7,"", "minimal modality fraction to use split by temperature (otherwise use default alpha).");
gd.addNumericField("Vegetation warmer", terr_difference, 5,7,"", "Pull vegetation to be this warmer.");
gd.addNumericField("Pull terrain cold", terr_pull_cold, 5,7,"", "Pull vegetations to warm, terrain to cold.");
......@@ -2721,6 +2736,9 @@ min_str_neib_fpn 0.35
terr_fit_scenes = gd.getNextBoolean();// boolean
terr_fit_elevations = gd.getNextBoolean();// boolean
terr_max_warp = gd.getNextNumber();// double
terr_max_elevation = (int) gd.getNextNumber();// int
terr_min_scenes = (int) gd.getNextNumber();// int
terr_min_samples_scene=(int) gd.getNextNumber();// int
terr_min_total_scenes=(int) gd.getNextNumber();// int
......@@ -3393,6 +3411,8 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"terr_fit_scenes", terr_fit_scenes+""); // boolean
properties.setProperty(prefix+"terr_fit_elevations", terr_fit_elevations+""); // boolean
properties.setProperty(prefix+"terr_max_warp", terr_max_warp+""); // double
properties.setProperty(prefix+"terr_max_elevation", terr_max_elevation+""); // int
properties.setProperty(prefix+"terr_min_scenes", terr_min_scenes+""); // int
properties.setProperty(prefix+"terr_min_samples_scene", terr_min_samples_scene+""); // int
properties.setProperty(prefix+"terr_min_total_scenes", terr_min_total_scenes+""); // int
......@@ -4087,6 +4107,9 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"terr_fit_alpha")!= null) terr_fit_alpha=Boolean.parseBoolean(properties.getProperty(prefix+"terr_fit_alpha"));
if (properties.getProperty(prefix+"terr_fit_scenes")!= null) terr_fit_scenes=Boolean.parseBoolean(properties.getProperty(prefix+"terr_fit_scenes"));
if (properties.getProperty(prefix+"terr_fit_elevations")!= null) terr_fit_elevations=Boolean.parseBoolean(properties.getProperty(prefix+"terr_fit_elevations"));
if (properties.getProperty(prefix+"terr_max_warp")!= null) terr_max_warp=Double.parseDouble(properties.getProperty(prefix+"terr_max_warp"));
if (properties.getProperty(prefix+"terr_max_elevation")!= null) terr_max_elevation=Integer.parseInt(properties.getProperty(prefix+"terr_max_elevation"));
if (properties.getProperty(prefix+"terr_min_scenes")!= null) terr_min_scenes=Integer.parseInt(properties.getProperty(prefix+"terr_min_scenes"));
if (properties.getProperty(prefix+"terr_min_samples_scene")!= null) terr_min_samples_scene=Integer.parseInt(properties.getProperty(prefix+"terr_min_samples_scene"));
if (properties.getProperty(prefix+"terr_min_total_scenes")!= null) terr_min_total_scenes=Integer.parseInt(properties.getProperty(prefix+"terr_min_total_scenes"));
......@@ -4751,6 +4774,8 @@ min_str_neib_fpn 0.35
imp.terr_fit_scenes = this.terr_fit_scenes;
imp.terr_fit_elevations = this.terr_fit_elevations;
imp.terr_max_warp = this.terr_max_warp;
imp.terr_max_elevation = this.terr_max_elevation;
imp.terr_min_scenes = this.terr_min_scenes;
imp.terr_min_samples_scene = this.terr_min_samples_scene;
imp.terr_min_total_scenes = this.terr_min_total_scenes;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -59,8 +59,8 @@ public class VegetationModel {
public double [] vegetation_full = null; // ~same as vegetation_average_render
public double [] vegetation_filtered = null; // more NaNs than in vegetation_average_render
public double [] vegetation_pull = null; // filled around actual vegetation to use as LMA pull
public double initial_transparent= 0.0;
public double initial_opaque= 1.0;
// public double initial_transparent= 0.0;
// public double initial_opaque= 1.0;
public double [][][] vegetation_warp = null;
......@@ -1380,16 +1380,18 @@ public class VegetationModel {
Rectangle woi_last = clt_parameters.imp.terr_woi_last; // new Rectangle(160,310,20,20); // 170
boolean skip_existing_woi = clt_parameters.imp.terr_skip_exist; // skip existing woi/parameters, already saved.
boolean continue_woi = clt_parameters.imp.terr_continue; // false;
int min_scenes = clt_parameters.imp.terr_min_scenes; // 1;
int min_samples_scene = clt_parameters.imp.terr_min_samples_scene; //10;
int min_total_scenes = clt_parameters.imp.terr_min_total_scenes; // 2;
int min_pixels = clt_parameters.imp.terr_min_pixels; //10;
boolean start_warm_veget = clt_parameters.imp.terr_warm_veget; // start with vegetation warmer than terrain
double terrain_warmest = clt_parameters.imp.terr_warmest; // pull vegetations to warm, terrain to cold
double initial_split = clt_parameters.imp.terr_initial_split; // pull vegetations to warm, terrain to cold
double min_split_frac = clt_parameters.imp.terr_min_split_frac;// 0.15;
double max_warp = clt_parameters.imp.terr_max_warp; // 1.8 - do not use scenes where distance between vegetation projection exceeds this
int max_offset = clt_parameters.imp.terr_max_elevation; // maximal "elevation" to consider
// int min_scenes = clt_parameters.imp.terr_min_scenes; // 1;
// int min_samples_scene = clt_parameters.imp.terr_min_samples_scene; //10;
// int min_total_scenes = clt_parameters.imp.terr_min_total_scenes; // 2;
// int min_pixels = clt_parameters.imp.terr_min_pixels; //10;
// boolean start_warm_veget = clt_parameters.imp.terr_warm_veget; // start with vegetation warmer than terrain
// double terrain_warmest = clt_parameters.imp.terr_warmest; // pull vegetations to warm, terrain to cold
// double initial_split = clt_parameters.imp.terr_initial_split; // pull vegetations to warm, terrain to cold
// double min_split_frac = clt_parameters.imp.terr_min_split_frac;// 0.15;
double terr_difference = clt_parameters.imp.terr_difference; // Pull vegetation to be this warmer
double terr_pull_cold = clt_parameters.imp.terr_pull_cold; // pull vegetations to warm, terrain to cold
......@@ -1859,8 +1861,8 @@ public class VegetationModel {
// }
initial_transparent = initial_split;
initial_opaque = 1.0 - initial_split;
// initial_transparent = initial_split;
// initial_opaque = 1.0 - initial_split;
VegetationLMA vegetationLMA = new VegetationLMA (
this,
......@@ -1915,19 +1917,19 @@ public class VegetationModel {
} else {
System.out.println("===== Will process a single WOI ("+woi.x+", "+woi.y+", "+woi.width+", "+woi.height+").");
}
final int max_offset = 22; // maximal "elevation" to consider
int num_samples = vegetationLMA.prepareLMA(
false, // final boolean keep_parameters,
woi, // final Rectangle woi,
min_scenes, // final int min_dependent_scenes, // minimal number of scenes (inside woi) vegetation pixel must influence
max_warp, // final double max_warp, // 1.8 - do not use scenes where distance between vegetation projection exceeds this
// min_scenes, // final int min_dependent_scenes, // minimal number of scenes (inside woi) vegetation pixel must influence
max_offset, // final int max_offset, // maximal "elevation" to consider
min_total_scenes, // final int min_total_scenes,
min_samples_scene, //final int min_samples_scene, // 10
min_pixels, // final int min_pixels,
start_warm_veget, // final boolean start_warm_veget, // start with vegetation warmer than terrain
terrain_warmest, // final double terrain_warmest, // warmest terrain (above is initially vegetation)
initial_split, // final double initial_split, // initial alpha: terrain 0.0+, vegetation 1.0-.
min_split_frac, // final double min_frac, // minimal modality fraction to use split by temperature
// min_total_scenes, // final int min_total_scenes,
// min_samples_scene, //final int min_samples_scene, // 10
// min_pixels, // final int min_pixels,
// start_warm_veget, // final boolean start_warm_veget, // start with vegetation warmer than terrain
// terrain_warmest, // final double terrain_warmest, // warmest terrain (above is initially vegetation)
// initial_split, // final double initial_split, // initial alpha: terrain 0.0+, vegetation 1.0-.
// min_split_frac, // final double min_frac, // minimal modality fraction to use split by temperature
terr_difference, // final double terr_difference, // pull vegetation to be this warmer
terr_pull_cold, // final double terr_pull_cold, // pull vegetations to warm, terrain to cold
default_alpha, // final double default_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