Commit deb75ee0 authored by Andrey Filippov's avatar Andrey Filippov

Working on smooth ground surface

parent ab8d3318
......@@ -468,6 +468,17 @@ public class CLTParameters {
public boolean gltf_alpha_blend = false; // true; // Use alpha blend (false - opaque)
// parameters for ground maps generation
// discard vegetation (tall objects), LPF ground surface. Especially needed for low quality depth map (no SfM)
public boolean gsmth_use_lma = true; // use only LMA-generated depth tiles
public double gsmth_discard_low = 0.2; // discard % of the lowest tiles (holes?)
public double gsmth_discard_high = 0.3; // discard % of the tallest tiles (high objects)
public int gsmth_stile_hstep = 4; // use supertiles twice larger
public double gsmth_stile_radius = 8.0; // fit planes to the data within this radius of the supertile center
public double gsmth_sigma = 4.0; // Additionally LPF after fitting planes
public int gsmth_radius_levels = 4; // increase radius twice multiple time if there are no enough tiles
public int gsmth_min_non_empty = 10; // minimal number of non-empty tiles for fitting planes
public int gsmth_border_level = 1; // 1 - start with twice larger radius for forder supertiles
public boolean gmap_render_hdr = true; // generate textures w/o normalization to generate undistorted
public boolean gmap_en = true; // generate ground map from a drone (enables gmap_render_hdr)
public boolean gmap_parallel_proj = true; // Use parallel projection (map)
......@@ -1625,6 +1636,16 @@ public class CLTParameters {
properties.setProperty(prefix+"gltf_emissive", this.gltf_emissive+"");
properties.setProperty(prefix+"gltf_alpha_blend", this.gltf_alpha_blend+"");
properties.setProperty(prefix+"gsmth_use_lma", this.gsmth_use_lma+ ""); // boolean
properties.setProperty(prefix+"gsmth_discard_low", this.gsmth_discard_low+ ""); // double
properties.setProperty(prefix+"gsmth_discard_high", this.gsmth_discard_high+ ""); // double
properties.setProperty(prefix+"gsmth_stile_hstep", this.gsmth_stile_hstep+ ""); // int
properties.setProperty(prefix+"gsmth_stile_radius", this.gsmth_stile_radius+ ""); // double
properties.setProperty(prefix+"gsmth_sigma", this.gsmth_sigma+ ""); // double
properties.setProperty(prefix+"gsmth_radius_levels", this.gsmth_radius_levels+""); // int
properties.setProperty(prefix+"gsmth_min_non_empty", this.gsmth_min_non_empty+""); // int
properties.setProperty(prefix+"gsmth_border_level", this.gsmth_border_level+ ""); // int
properties.setProperty(prefix+"gmap_render_hdr", this.gmap_render_hdr+""); // boolean
properties.setProperty(prefix+"gmap_en", this.gmap_en+""); // boolean
......@@ -2659,6 +2680,16 @@ public class CLTParameters {
if (properties.getProperty(prefix+"gltf_emissive")!=null) this.gltf_emissive=Boolean.parseBoolean(properties.getProperty(prefix+"gltf_emissive"));
if (properties.getProperty(prefix+"gltf_alpha_blend")!=null) this.gltf_alpha_blend=Boolean.parseBoolean(properties.getProperty(prefix+"gltf_alpha_blend"));
if (properties.getProperty(prefix+"gsmth_use_lma")!=null) this.gsmth_use_lma =Boolean.parseBoolean(properties.getProperty(prefix+ "gsmth_use_lma" ));
if (properties.getProperty(prefix+"gsmth_discard_low")!=null) this.gsmth_discard_low =Double.parseDouble(properties.getProperty(prefix+ "gsmth_discard_low" ));
if (properties.getProperty(prefix+"gsmth_discard_high")!=null) this.gsmth_discard_high =Double.parseDouble(properties.getProperty(prefix+ "gsmth_discard_high" ));
if (properties.getProperty(prefix+"gsmth_stile_hstep")!=null) this.gsmth_stile_hstep =Integer.parseInt(properties.getProperty(prefix+ "gsmth_stile_hstep" ));
if (properties.getProperty(prefix+"gsmth_stile_radius")!=null) this.gsmth_stile_radius =Double.parseDouble(properties.getProperty(prefix+ "gsmth_stile_radius" ));
if (properties.getProperty(prefix+"gsmth_sigma")!=null) this.gsmth_sigma =Double.parseDouble(properties.getProperty(prefix+ "gsmth_sigma" ));
if (properties.getProperty(prefix+"gsmth_radius_levels")!=null) this.gsmth_radius_levels=Integer.parseInt(properties.getProperty(prefix+ "gsmth_radius_levels"));
if (properties.getProperty(prefix+"gsmth_min_non_empty")!=null) this.gsmth_min_non_empty=Integer.parseInt(properties.getProperty(prefix+ "gsmth_min_non_empty"));
if (properties.getProperty(prefix+"gsmth_border_level")!=null) this.gsmth_border_level =Integer.parseInt(properties.getProperty(prefix+ "gsmth_border_level" ));
if (properties.getProperty(prefix+"gmap_render_hdr")!=null) this.gmap_render_hdr=Boolean.parseBoolean(properties.getProperty(prefix+ "gmap_render_hdr"));
if (properties.getProperty(prefix+"gmap_en")!=null) this.gmap_en=Boolean.parseBoolean(properties.getProperty(prefix+ "gmap_en"));
if (properties.getProperty(prefix+"gmap_parallel_proj")!=null) this.gmap_parallel_proj=Boolean.parseBoolean(properties.getProperty(prefix+"gmap_parallel_proj"));
......@@ -3919,8 +3950,28 @@ public class CLTParameters {
"Minimal number of background tiles to generate background.");
gd.addMessage ("glTF export");
gd.addCheckbox ("glTF use emissive textures", this.gltf_emissive);
gd.addCheckbox ("glTF use alpha blend", this.gltf_alpha_blend);
gd.addCheckbox ("glTF use emissive textures", this.gltf_emissive);
gd.addCheckbox ("glTF use alpha blend", this.gltf_alpha_blend);
gd.addMessage ("Extract smooth ground surface");
gd.addCheckbox ("Use only LMA disparity for ground", this.gsmth_use_lma,
"Use only LMA-generated disparity to find the ground plane to project the map.");
gd.addNumericField("Discard low fraction", this.gmap_discard_low, 4,6,"",
"Discard lowest tiles (ditches) up to this fraction of all available tiles when finding the ground plane for the map projection.");
gd.addNumericField("Discard high fraction", this.gsmth_discard_high, 4,6,"",
"Discard highest tiles (vegetation, structure) up to this fraction of all available tiles when finding the ground plane for the map projection.");
gd.addNumericField("Half-pitch of the supertiles", this.gsmth_stile_hstep, 0,3,"tiles",
"Supertiles centers will be at 1x, 3x, 5x, ... this value in each of the ortho directions.");
gd.addNumericField("Plane-fitting radius", this.gsmth_stile_radius, 4,6,"tiles",
"Fit a plane to each supertile using tiles within this radius around the center.");
gd.addNumericField("LPF sigma", this.gsmth_sigma, 4,6,"tiles",
"Use Gaussian blur to additionally blur the surface of the fitted planes.");
gd.addNumericField("Number of radius levels", this.gsmth_radius_levels, 0,3,"pix",
"Number of times to double fitting radius when there are insufficient tiles for plane fitting.");
gd.addNumericField("Minimal tiles for fitting", this.gsmth_min_non_empty, 0,3,"pix",
"Minimal number of tiles needed for plane fitting.");
gd.addNumericField("Border radius level", this.gsmth_border_level, 0,3,"pix",
"Start with higher radius level for border supertiles (1 - use twice larger radius.");
gd.addMessage ("Ground map export");
gd.addMessage ("Use of IMS/GNSS data is "+(imp.ims_use? "ENABLED":"DISABLED")+" (see 'IMS' configuration tab)");
......@@ -5184,6 +5235,16 @@ public class CLTParameters {
this.gltf_emissive= gd.getNextBoolean();
this.gltf_alpha_blend= gd.getNextBoolean();
this.gsmth_use_lma= gd.getNextBoolean();
this.gsmth_discard_low= gd.getNextNumber();
this.gsmth_discard_high= gd.getNextNumber();
this.gsmth_stile_hstep= (int) gd.getNextNumber();
this.gsmth_stile_radius= gd.getNextNumber();
this.gsmth_sigma= gd.getNextNumber();
this.gsmth_radius_levels= (int) gd.getNextNumber();
this.gsmth_min_non_empty= (int) gd.getNextNumber();
this.gsmth_border_level= (int) gd.getNextNumber();
this.gmap_render_hdr= gd.getNextBoolean();
this.gmap_en= gd.getNextBoolean();
this.gmap_parallel_proj= gd.getNextBoolean();
......
......@@ -5429,7 +5429,7 @@ public class OpticalFlow {
}
}
// quadCLTs[ref_index].getSmoothGround(clt_parameters);
quadCLTs[ref_index].getSmoothGround(clt_parameters, debugLevel);
// later move to the right place
if (adjust_imu_orient) { // (quadCLTs[ref_index].getNumOrient() >= clt_parameters.imp.mb_all_index)) {
......
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