publicdoubleterr_nan_tolerance=0.001;// set undefined terrain (out of capture area) to nan, it is almost zero after UM
public double terr_nan_tolerance = 0.001; // set undefined terrain (out of capture area) to nan, it is almost zero after UM. if !terr_um_en will be forced ==0.0
publicintterr_nan_grow=20;// grow undefined terrain after detection
public int terr_nan_grow = 20; // grow undefined scenes terrain after detection
public int terr_shrink_veget = 20; // shrink accumulated vegetation for filling terrain
public int terr_shrink_terrain= 20; // shrink accumulated terrain after cutting shrunk vegetation (added to terr_shrink_veget)
public double terr_vegetation_over = 35; // initial vegetation over (hotter) filled terrain
public int terr_filter_veget = 10; // shrink+grow shrunk vegetation to remove small clusters
public boolean terr_tile_woi = true; // if false - use woi50;
public boolean terr_tile_woi = true; // if false - use woi50;
public Rectangle terr_woi_enclos = new Rectangle(80, 210, 210, 230); // will be tiled, using width/height from woi_step;
public Rectangle terr_woi_enclos = new Rectangle(80, 210, 210, 230); // will be tiled, using width/height from woi_step;
@@ -737,6 +741,12 @@ min_str_neib_fpn 0.35
public boolean terr_skip_exist= true; // skip existing woi/parameters, already saved.
public boolean terr_skip_exist= true; // skip existing woi/parameters, already saved.
public boolean terr_continue= false; // start from last/single
public boolean terr_continue= false; // start from last/single
public boolean terr_fit_terr = true; // adjust terrain pixels
public boolean terr_fit_veget = true; // adjust vegetation pixels
public boolean terr_fit_alpha = true; // adjust vegetation alpha pixels
public boolean terr_fit_scenes = true; // adjust scene offsets (start from 0 always?)
gd.addNumericField("NaN tolerance",terr_nan_tolerance,5,7,"","Replace continuous almost zeros with NaN-s.");
gd.addNumericField("NaN grow",terr_nan_grow,0,3,"pix","Grow \"almost\" zero areas after detection (+2 - 8 directions, +1 - only ortho).");
gd.addMessage ("Preparaion of the initial LMA approximation");
gd.addNumericField("NaN tolerance", terr_nan_tolerance, 5,7,"", "Replace continuous almost zeros with NaN-s (ignored and forced to 0 if no UM filter).");
gd.addNumericField("NaN grow", terr_nan_grow, 0,3,"pix", "Grow zero/\"almost\" zero rendered scene areas (+2 - 8 directions, +1 - only ortho), replace with NaNs.");
gd.addNumericField("Shrink vegetation", terr_shrink_veget, 0,3,"pix", "Shrink detected vegetation areas for terrain separation.");
gd.addNumericField("Shrink terrain", terr_shrink_terrain, 0,3,"pix", "Shrink remaining detected terrain areas before filling with laplacian (terr_shrink_veget is added to start from the original size).");
gd.addNumericField("Vegetation hotter", terr_vegetation_over, 5,7,"", "Initially consider to be vegetation if it is this hotter than filled in terrain holes.");
gd.addNumericField("Vegetation shrink+grow", terr_filter_veget, 0,3,"pix", "Shrink + grow hot enough vegetation to filter from small clusters - needed for initial alpha.");
gd.addMessage ("Scan WOI parameters");
gd.addMessage ("Scan WOI parameters");
gd.addCheckbox ("Tiled WOI", terr_tile_woi, "Process tiled WOI (False - a single one).");
gd.addCheckbox ("Tiled WOI", terr_tile_woi, "Process tiled WOI (False - a single one).");
properties.setProperty(prefix+"terr_min_scenes", terr_min_scenes+""); // 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_samples_scene", terr_min_samples_scene+""); // int
properties.setProperty(prefix+"terr_min_total_scenes", terr_min_total_scenes+""); // int
properties.setProperty(prefix+"terr_min_total_scenes", terr_min_total_scenes+""); // int
@@ -4008,6 +4054,10 @@ min_str_neib_fpn 0.35
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"));
if (properties.getProperty(prefix+"terr_nan_tolerance")!= null) terr_nan_tolerance=Double.parseDouble(properties.getProperty(prefix+"terr_nan_tolerance"));
if (properties.getProperty(prefix+"terr_nan_tolerance")!= null) terr_nan_tolerance=Double.parseDouble(properties.getProperty(prefix+"terr_nan_tolerance"));
if (properties.getProperty(prefix+"terr_nan_grow")!= null) terr_nan_grow=Integer.parseInt(properties.getProperty(prefix+"terr_nan_grow"));
if (properties.getProperty(prefix+"terr_nan_grow")!= null) terr_nan_grow=Integer.parseInt(properties.getProperty(prefix+"terr_nan_grow"));
if (properties.getProperty(prefix+"terr_shrink_veget")!= null) terr_shrink_veget=Integer.parseInt(properties.getProperty(prefix+"terr_shrink_veget"));
if (properties.getProperty(prefix+"terr_shrink_terrain")!= null) terr_shrink_terrain=Integer.parseInt(properties.getProperty(prefix+"terr_shrink_terrain"));
if (properties.getProperty(prefix+"terr_vegetation_over")!= null) terr_vegetation_over=Double.parseDouble(properties.getProperty(prefix+"terr_vegetation_over"));
if (properties.getProperty(prefix+"terr_filter_veget")!= null) terr_filter_veget=Integer.parseInt(properties.getProperty(prefix+"terr_filter_veget"));
if (properties.getProperty(prefix+"terr_tile_woi")!= null) terr_tile_woi=Boolean.parseBoolean(properties.getProperty(prefix+"terr_tile_woi"));
if (properties.getProperty(prefix+"terr_tile_woi")!= null) terr_tile_woi=Boolean.parseBoolean(properties.getProperty(prefix+"terr_tile_woi"));
if (properties.getProperty(prefix+"terr_continue")!= null) terr_continue=Boolean.parseBoolean(properties.getProperty(prefix+"terr_continue"));
if (properties.getProperty(prefix+"terr_continue")!= null) terr_continue=Boolean.parseBoolean(properties.getProperty(prefix+"terr_continue"));
@@ -4016,6 +4066,11 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"terr_woi_last")!= null) terr_woi_last=stringToRectangle((String) properties.getProperty(prefix+"terr_woi_last"));
if (properties.getProperty(prefix+"terr_woi_last")!= null) terr_woi_last=stringToRectangle((String) properties.getProperty(prefix+"terr_woi_last"));
if (properties.getProperty(prefix+"terr_skip_exist")!= null) terr_skip_exist=Boolean.parseBoolean(properties.getProperty(prefix+"terr_skip_exist"));
if (properties.getProperty(prefix+"terr_skip_exist")!= null) terr_skip_exist=Boolean.parseBoolean(properties.getProperty(prefix+"terr_skip_exist"));
if (properties.getProperty(prefix+"terr_fit_terr")!= null) terr_fit_terr=Boolean.parseBoolean(properties.getProperty(prefix+"terr_fit_terr"));
if (properties.getProperty(prefix+"terr_fit_veget")!= null) terr_fit_veget=Boolean.parseBoolean(properties.getProperty(prefix+"terr_fit_veget"));
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_min_scenes")!= null) terr_min_scenes=Integer.parseInt(properties.getProperty(prefix+"terr_min_scenes"));
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_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"));
if (properties.getProperty(prefix+"terr_min_total_scenes")!= null) terr_min_total_scenes=Integer.parseInt(properties.getProperty(prefix+"terr_min_total_scenes"));