...
 
Commits (2)
......@@ -414,6 +414,7 @@ public class CLTParameters {
public int tex_subdiv_tiles = 4; // subdivide tiles to smaller triangles
public int tex_sky_extra = 2; // additionally grow sky area (in layers) without marking as sky
public int tex_sky_below = 10; // extend sky these tile rows below lowest
public int tex_shrink_sky_pix = 4; // shrink background by pixels
// gd.addMessage ("Triangular mesh");
public boolean tex_disp_hires_tri = true; // Display high resolution mesh
......@@ -523,6 +524,7 @@ public class CLTParameters {
public boolean lre_use_min_max = true; // when trimming by tone, use min/max of the FG/BG instead of weighted averages
public double lre_temp_radius = 11.5; // How far to look around for FG trimming by temperature
public int lre_temp_same_radius = 1; // new opaque/transparent pixel should have same within +/- this radius from it (<=0 - disable)
public int lre_temp_min = 2; // Minimal number of each of FG/BG while trimming by temperature
public double lre_temp_weight = 20.0; // Multiply -1.0..+1.0 range of the current pixel between average BG(-1) and FG(+1)
public double lre_min_use_occl = 1.5; // Minimal FG/BG difference to use trimming by occlusions. For lower use only temperature/tone
......@@ -1535,6 +1537,7 @@ public class CLTParameters {
properties.setProperty(prefix+"tex_subdiv_tiles", this.tex_subdiv_tiles+""); // int
properties.setProperty(prefix+"tex_sky_extra", this.tex_sky_extra+""); // int
properties.setProperty(prefix+"tex_sky_below", this.tex_sky_below+""); // int
properties.setProperty(prefix+"tex_shrink_sky_pix", this.tex_shrink_sky_pix+""); // int
properties.setProperty(prefix+"tex_disp_hires_tri", this.tex_disp_hires_tri+""); // boolean
properties.setProperty(prefix+"tex_dbg_scale_mesh", this.tex_dbg_scale_mesh+""); // int
......@@ -1642,6 +1645,8 @@ public class CLTParameters {
properties.setProperty(prefix+"lre_use_min_max", this.lre_use_min_max+""); // boolean
properties.setProperty(prefix+"lre_temp_radius", this.lre_temp_radius+""); // double
properties.setProperty(prefix+"lre_temp_same_radius", this.lre_temp_same_radius+""); // int
properties.setProperty(prefix+"lre_temp_min", this.lre_temp_min+""); // int
properties.setProperty(prefix+"lre_temp_weight", this.lre_temp_weight+""); // double
properties.setProperty(prefix+"lre_min_use_occl", this.lre_min_use_occl+""); // double
......@@ -2531,6 +2536,7 @@ public class CLTParameters {
if (properties.getProperty(prefix+"tex_subdiv_tiles")!=null) this.tex_subdiv_tiles=Integer.parseInt(properties.getProperty(prefix+"tex_subdiv_tiles"));
if (properties.getProperty(prefix+"tex_sky_extra")!=null) this.tex_sky_extra=Integer.parseInt(properties.getProperty(prefix+"tex_sky_extra"));
if (properties.getProperty(prefix+"tex_sky_below")!=null) this.tex_sky_below=Integer.parseInt(properties.getProperty(prefix+"tex_sky_below"));
if (properties.getProperty(prefix+"tex_shrink_sky_pix")!=null) this.tex_shrink_sky_pix=Integer.parseInt(properties.getProperty(prefix+"tex_shrink_sky_pix"));
if (properties.getProperty(prefix+"tex_disp_hires_tri")!=null) this.tex_disp_hires_tri=Boolean.parseBoolean(properties.getProperty(prefix+"tex_disp_hires_tri"));
if (properties.getProperty(prefix+"tex_dbg_scale_mesh")!=null) this.tex_dbg_scale_mesh=Integer.parseInt(properties.getProperty(prefix+"tex_dbg_scale_mesh"));
......@@ -2638,6 +2644,8 @@ public class CLTParameters {
if (properties.getProperty(prefix+"lre_use_min_max")!=null) this.lre_use_min_max=Boolean.parseBoolean(properties.getProperty(prefix+"lre_use_min_max"));// boolean
if (properties.getProperty(prefix+"lre_temp_radius")!=null) this.lre_temp_radius=Double.parseDouble(properties.getProperty(prefix+"lre_temp_radius"));// double
if (properties.getProperty(prefix+"lre_temp_same_radius")!=null) this.lre_temp_same_radius=Integer.parseInt(properties.getProperty(prefix+"lre_temp_same_radius"));// int
if (properties.getProperty(prefix+"lre_temp_min")!=null) this.lre_temp_min=Integer.parseInt(properties.getProperty(prefix+"lre_temp_min"));// int
if (properties.getProperty(prefix+"lre_temp_weight")!=null) this.lre_temp_weight=Double.parseDouble(properties.getProperty(prefix+"lre_temp_weight"));// double
if (properties.getProperty(prefix+"lre_min_use_occl")!=null) this.lre_min_use_occl=Double.parseDouble(properties.getProperty(prefix+"lre_min_use_occl"));// double
......@@ -3707,6 +3715,8 @@ public class CLTParameters {
"additionally grow sky area (in layers) without marking it as sky.");
gd.addNumericField("Extend sky area down", this.tex_sky_below, 0,3,"tiles",
"if >=0, extend sky these tile rows below lowest and extend sky up, right and left to full image.");
gd.addNumericField("Shrink trimmed sky", this.tex_shrink_sky_pix, 0,3,"pix",
"Shrink sky area after processing occlusions. Shrink by 1 pixel row - 2.");
gd.addMessage ("Triangular mesh");
gd.addCheckbox ("Display high resolution mesh", this.tex_disp_hires_tri,
......@@ -3902,10 +3912,13 @@ public class CLTParameters {
gd.addMessage("Trimming by temperature (tone)");
gd.addCheckbox ("Use min/max instead of averages", this.lre_show_debug, // true
gd.addCheckbox ("Use min/max instead of averages", this.lre_use_min_max, // true
"when trimming by tone, use min/max of the FG/BG instead of weighted averages.");
gd.addNumericField("Trim by temperature radius", this.lre_temp_radius, 5,7,"",
gd.addNumericField("Trim by temperature radius", this.lre_temp_radius, 5,7,"pix",
"How far to look around for FG trimming by temperature.");
gd.addNumericField("Old same transparency within radius", this.lre_temp_same_radius, 0,3,"pix", // 10
"New opaque/transparent pixel should have same within +/- this radius from it (<=0 - disable).");
gd.addNumericField("Min FG and BG neibs within radius", this.lre_temp_min, 0,3,"", // 10
"Minimal number of each of FG/BG while trimming by temperature.");
gd.addNumericField("Cost weight of temperature", this.lre_temp_weight, 5,7,"",
......@@ -4945,6 +4958,7 @@ public class CLTParameters {
this.tex_subdiv_tiles = (int) gd.getNextNumber();
this.tex_sky_extra = (int) gd.getNextNumber();
this.tex_sky_below = (int) gd.getNextNumber();
this.tex_shrink_sky_pix = (int) gd.getNextNumber();
this.tex_disp_hires_tri = gd.getNextBoolean();
this.tex_dbg_scale_mesh = (int) gd.getNextNumber();
......@@ -5049,10 +5063,12 @@ public class CLTParameters {
this.lre_best_dir_frac= gd.getNextNumber(); // double
this.lre_use_min_max= gd.getNextBoolean(); // boolean
this.lre_temp_radius= gd.getNextNumber(); // double
this.lre_temp_radius= gd.getNextNumber(); // double
this.lre_temp_same_radius= (int) gd.getNextNumber(); // int
this.lre_temp_min= (int) gd.getNextNumber(); // int
this.lre_min_use_occl= gd.getNextNumber(); // double
this.lre_temp_weight= gd.getNextNumber(); // double
this.lre_min_use_occl= gd.getNextNumber(); // double
this.lre_temp_disparity= gd.getNextNumber(); // double
......