@@ -2641,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_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_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_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_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
if (properties.getProperty(prefix+"lre_min_use_occl")!=null) this.lre_min_use_occl=Double.parseDouble(properties.getProperty(prefix+"lre_min_use_occl"));// double
@@ -3909,8 +3914,11 @@ public class CLTParameters {
gd.addCheckbox ("Use min/max instead of averages", this.lre_use_min_max, // 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.");
"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.");
"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
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.");
"Minimal number of each of FG/BG while trimming by temperature.");
gd.addNumericField("Cost weight of temperature", this.lre_temp_weight, 5,7,"",
gd.addNumericField("Cost weight of temperature", this.lre_temp_weight, 5,7,"",
@@ -5056,6 +5064,8 @@ public class CLTParameters {
@@ -5705,6 +5729,7 @@ public class TexturedModel {
//"Trimming by temperature (tone)
//"Trimming by temperature (tone)
final boolean temp_use_min_max = clt_parameters.lre_use_min_max; // = true; // when trimming by tone, use min/max of the FG/BG instead of weighted averages
final boolean temp_use_min_max = clt_parameters.lre_use_min_max; // = true; // when trimming by tone, use min/max of the FG/BG instead of weighted averages
final double temp_radius = clt_parameters.lre_temp_radius; // 11.5; // How far to look around for FG trimming by temperature
final double temp_radius = clt_parameters.lre_temp_radius; // 11.5; // How far to look around for FG trimming by temperature
final int temp_same_radius = clt_parameters.lre_temp_same_radius; // 2; // New opaque/transparent pixel should have same within +/- this radius from it (<=0 - disable)
final int temp_min = clt_parameters.lre_temp_min; // 2; // Minimal number of each of FG/BG while trimming by temperature
final int temp_min = clt_parameters.lre_temp_min; // 2; // Minimal number of each of FG/BG while trimming by temperature
final double temp_weight = clt_parameters.lre_temp_weight; //20.0; // Multiply -1.0..+1.0 range of the current pixel between average BG(-1) and FG(+1)
final double temp_weight = clt_parameters.lre_temp_weight; //20.0; // Multiply -1.0..+1.0 range of the current pixel between average BG(-1) and FG(+1)
final double min_use_occl= clt_parameters.lre_min_use_occl; // 1.5; // Minimal FG/BG difference to use trimming by occlusions. For lower use only
final double min_use_occl= clt_parameters.lre_min_use_occl; // 1.5; // Minimal FG/BG difference to use trimming by occlusions. For lower use only
@@ -6079,6 +6104,7 @@ public class TexturedModel {
//"Trimming by temperature (tone)
//"Trimming by temperature (tone)
temp_use_min_max, // final boolean use_min_max, // when trimming by tone, use min/max of the FG/BG instead of weighted averages
temp_use_min_max, // final boolean use_min_max, // when trimming by tone, use min/max of the FG/BG instead of weighted averages
temp_radius, // final double temp_radius, // = 5.0; // How far to look around for FG trimming by temperature
temp_radius, // final double temp_radius, // = 5.0; // How far to look around for FG trimming by temperature
temp_same_radius, // final int temp_same_radius, // = 2; New opaque/transparent pixel should have same within +/- his radius
temp_min, // final int temp_min, // = 2; // Minimal number of each of FG/BG while trimming by temperature
temp_min, // final int temp_min, // = 2; // Minimal number of each of FG/BG while trimming by temperature
temp_weight, // final double temp_weight, // = 5.0; // Multiply -1.0..+1.0 range of the current pixel between average BG(-1) and FG(+1)
temp_weight, // final double temp_weight, // = 5.0; // Multiply -1.0..+1.0 range of the current pixel between average BG(-1) and FG(+1)
min_use_occl, // final double min_use_occl,// = 1.5; // Minimal FG/BG difference to use trimming by occlusions. For lower use only
min_use_occl, // final double min_use_occl,// = 1.5; // Minimal FG/BG difference to use trimming by occlusions. For lower use only
@@ -6830,7 +6856,7 @@ public class TexturedModel {
THREADS_MAX); // final int threadsMax) // maximal number of threads to launch
THREADS_MAX); // final int threadsMax) // maximal number of threads to launch
}
}
if(debugLevel>-2){
if (debugLevel > -1) {
double [][] dbg_textures = new double [faded_textures.length * faded_textures[0].length][faded_textures[0][0].length];
double [][] dbg_textures = new double [faded_textures.length * faded_textures[0].length][faded_textures[0][0].length];
String [] dbg_titles = new String[dbg_textures.length];
String [] dbg_titles = new String[dbg_textures.length];
String [] dbg_subtitles = new String [faded_textures[0].length];
String [] dbg_subtitles = new String [faded_textures[0].length];
@@ -6864,7 +6890,7 @@ public class TexturedModel {
tex_um_weight); // final double um_weight)
tex_um_weight); // final double um_weight)
}
}
if(debugLevel>-2){
if (debugLevel > -1) {
double [][] dbg_textures = new double [faded_textures.length * faded_textures[0].length][faded_textures[0][0].length];
double [][] dbg_textures = new double [faded_textures.length * faded_textures[0].length][faded_textures[0][0].length];
String [] dbg_titles = new String[dbg_textures.length];
String [] dbg_titles = new String[dbg_textures.length];
String [] dbg_subtitles = new String [faded_textures[0].length];
String [] dbg_subtitles = new String [faded_textures[0].length];