publicdoublealpha_loss=0;// not used with cosine alpha
publicdoublealpha_offset=0;// if >0, start losses above 0.0 and below 1.0;
publicdoublealpha_lpf=0;
publicbooleanalpha_piece_linear=true;
publicdoublealpha_scale_avg=1.0;// 1.1; // scale average alpha (around 0.5) when pulling to it
publicdoublealpha_push=12.0;// push from alpha==0.5
publicdoublealpha_push_neutral=0.8;// alpha point from which push (closer to opaque)
publicdoublealpha_push_center=1.5;// weight of center alpha pixel relative to each of the 4 ortho ones
publicdoublealpha_mm_hole=0.1;// NaN to disable. Local "almost minimum" (lower than this fraction between min and max neighbor) is not subject to alpha_lpf
publicdoublealpha_diff_hole=0.01;// minimal alpha difference between min and max neighbor to be considered a hole
publicbooleanfrom_file=false;
publicdoubleterr_lpf=0;
publicdoubleveget_lpf=0;
...
...
@@ -134,6 +146,12 @@ public class VegetationLMA {
finaldoublealpha_loss,// quadratic loss when alpha reaches -1.0 or 2.0
finaldoublealpha_offset,// quadratic loss when alpha reaches -1.0 or 2.0
finaldoublealpha_lpf,// pull vegetation alpha to average of 4 neighbors
finaldoublealpha_scale_avg,// = 1.2; // scale average alpha (around 0.5) when pulling to it
finaldoublealpha_push,// 5.0; // push from alpha==0.5
finaldoublealpha_push_neutral,// = 0.8; // alpha point from which push (closer to opaque)
finaldoublealpha_push_center,// 1.5; // weight of center alpha pixel relative to each of the 4 ortho ones
finaldoublealpha_mm_hole,// = 0.1; // NaN to disable. Local "almost minimum" (lower than this fraction between min and max neighbor) is not subject to alpha_lpf
finaldoubleterr_lpf,// pull terrain to average of 4 neighbors (very small)
finaldoubleveget_lpf,// pull vegetation to average of 4 neighbors (very small - maybe not needed)
finaldoubleterr_pull0,// pull terrain to zero (makes sense with UM
...
...
@@ -147,8 +165,16 @@ public class VegetationLMA {
this.alpha_loss=alpha_loss;
this.alpha_offset=alpha_offset;
this.alpha_lpf=alpha_lpf;
this.alpha_scale_avg=alpha_scale_avg;
this.alpha_piece_linear=alpha_piece_linear;
this.alpha_push=alpha_push;// 5.0; // push from alpha==0.5
this.alpha_push_neutral=alpha_push_neutral;// 0.8; // alpha point from which push (closer to opaque)
this.alpha_push_center=alpha_push_center;// 1.5; // weight of center alpha pixel relative to each of the 4 ortho ones
this.alpha_mm_hole=alpha_mm_hole;
this.terr_lpf=terr_lpf;
this.veget_lpf=veget_lpf;
this.terr_pull0=terr_pull0;
this.veget_pull0=veget_pull0;
this.boost_parallax=boost_parallax;
this.um_sigma=um_sigma;// just use in debug image names
this.um_weight=um_weight;
...
...
@@ -179,6 +205,7 @@ public class VegetationLMA {
if(!keep_parameters){
setupParametersVector(default_alpha);// areas where both terrain and vegetation are available
alpha_scale_avg,// final double alpha_scale_avg, // = 1.2; // scale average alpha (around 0.5) when pulling to it
alpha_push,// final double alpha_push, // 5.0; // push from alpha==0.5
alpha_push_neutral,// double alpha_push_neutral = 0.8; // alpha point from which push (closer to opaque)
alpha_push_center,// final double alpha_push_center,// 1.5; // weight of center alpha pixel relative to each of the 4 ortho ones
alpha_mm_hole,// double alpha_mm_hole = 0.1; // NaN to disable. Local "almost minimum" (lower than this fraction between min and max neighbor) is not subject to alpha_lpf
terr_lpf,// final double terr_lpf, // pull terrain to average of 4 neighbors (very small)
veget_lpf,// final double veget_lpf, // pull vegetation to average of 4 neighbors (very small - maybe not needed)
terr_pull0,// final double terr_pull0, // pull terrain to zero (makes sense with UM
...
...
@@ -807,8 +848,6 @@ public class VegetationModel {