Commit af55d764 authored by Andrey Filippov's avatar Andrey Filippov

Improved fillNaNs, tested terrain-only tiles

parent 108cab36
......@@ -892,6 +892,8 @@ min_str_neib_fpn 0.35
public int terr_num_exaggerate = 3; // generate exaggerated rendering
// Experimental reconstruction
public boolean terr_rebuild_elev = false; // rebuild elevations and scales
public int terr_elev_grow = 1024; // was 200
public double terr_threshold_terrain = 0.05;
public double terr_min_max_terrain= 0.1;
public double terr_min_terrain = 0.001;
......@@ -2249,6 +2251,9 @@ min_str_neib_fpn 0.35
gd.addNumericField("Exagerrate steps", terr_num_exaggerate, 0,3,"", ".");
gd.addMessage ("Experimental");
gd.addCheckbox ("Rebuild elevations", terr_rebuild_elev, "Regenerate elevations/scales in *.terrveg-tiff file");
gd.addNumericField("Grow elevations", terr_elev_grow, 0,3,"","Grow elevations over NaNs.");
gd.addNumericField("Terrain threshold alpha",terr_threshold_terrain, 5,7,"", ".");
gd.addNumericField("Min max terrain", terr_min_max_terrain, 5,7,"", ".");
gd.addNumericField("Minimal terrain", terr_min_terrain, 5,7,"", ".");
......@@ -3021,7 +3026,8 @@ min_str_neib_fpn 0.35
terr_boost_render = gd.getNextNumber(); // double
terr_max_render = gd.getNextNumber(); // double
terr_num_exaggerate = (int)gd.getNextNumber(); // int
terr_rebuild_elev = gd.getNextBoolean();// boolean
terr_elev_grow = (int)gd.getNextNumber(); // int
terr_threshold_terrain = gd.getNextNumber();// double
terr_min_max_terrain = gd.getNextNumber();// double
terr_min_terrain = gd.getNextNumber();// double
......@@ -3772,7 +3778,8 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"terr_boost_render", terr_boost_render+""); // double
properties.setProperty(prefix+"terr_max_render", terr_max_render+""); // double
properties.setProperty(prefix+"terr_num_exaggerate", terr_num_exaggerate+""); // int
properties.setProperty(prefix+"terr_rebuild_elev", terr_rebuild_elev+""); // boolean
properties.setProperty(prefix+"terr_elev_grow", terr_elev_grow+""); // int
properties.setProperty(prefix+"terr_threshold_terrain", terr_threshold_terrain+""); // double
properties.setProperty(prefix+"terr_min_max_terrain", terr_min_max_terrain+""); // double
properties.setProperty(prefix+"terr_min_terrain", terr_min_terrain+""); // double
......@@ -4543,7 +4550,8 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"terr_boost_render")!= null) terr_boost_render=Double.parseDouble(properties.getProperty(prefix+"terr_boost_render"));
if (properties.getProperty(prefix+"terr_max_render")!= null) terr_max_render=Double.parseDouble(properties.getProperty(prefix+"terr_max_render"));
if (properties.getProperty(prefix+"terr_num_exaggerate")!= null) terr_num_exaggerate=Integer.parseInt(properties.getProperty(prefix+"terr_num_exaggerate"));
if (properties.getProperty(prefix+"terr_rebuild_elev")!= null) terr_rebuild_elev=Boolean.parseBoolean(properties.getProperty(prefix+"terr_rebuild_elev"));
if (properties.getProperty(prefix+"terr_elev_grow")!= null) terr_elev_grow=Integer.parseInt(properties.getProperty(prefix+"terr_elev_grow"));
if (properties.getProperty(prefix+"terr_threshold_terrain")!= null) terr_threshold_terrain=Double.parseDouble(properties.getProperty(prefix+"terr_threshold_terrain"));
if (properties.getProperty(prefix+"terr_min_max_terrain")!= null) terr_min_max_terrain=Double.parseDouble(properties.getProperty(prefix+"terr_min_max_terrain"));
if (properties.getProperty(prefix+"terr_min_terrain")!= null) terr_min_terrain=Double.parseDouble(properties.getProperty(prefix+"terr_min_terrain"));
......@@ -5275,7 +5283,8 @@ min_str_neib_fpn 0.35
imp.terr_boost_render = this.terr_boost_render;
imp.terr_max_render = this.terr_max_render;
imp.terr_num_exaggerate = this.terr_num_exaggerate;
imp.terr_rebuild_elev = this.terr_rebuild_elev;
imp.terr_elev_grow = this.terr_elev_grow;
imp.terr_threshold_terrain = this.terr_threshold_terrain;
imp.terr_min_max_terrain = this.terr_min_max_terrain;
imp.terr_min_terrain = this.terr_min_terrain;
......
......@@ -5531,7 +5531,8 @@ public class TexturedModel {
0.7, // double diagonal_weight, // relative to ortho
100, // int num_passes,
0.01, // final double max_rchange, // = 0.01
THREADS_MAX); // final int threadsMax) // maximal number of threads to launch
THREADS_MAX, // final int threadsMax) // maximal number of threads to launch
0); // final int debugLevel) // 0 - none, 1 - when done, 2 - all iterations
if (dbg_img != null) dbg_img[4] = sky_pixels_filled.clone();
if (blur_sigma > 0.0) {
(new DoubleGaussianBlur()).blurDouble(
......
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