publicdoubleterr_alpha_scale_avg=1.0;// scale average alpha (around 0.5) when pulling to it
publicdoubleterr_alpha_push=12;// push from alpha==0.5
publicdoubleterr_alpha_push_neutral=0.5;// alpha point from which push (closer to opaque)
publicdoubleterr_alpha_push_play=0.0;// no push for alpha this below 1.0
publicdoubleterr_alpha_weight_center=1.5;// weight of center alpha pixel relative to each of the 4 ortho ones
publicbooleanterr_en_holes=true;// enable small holes // maybe second pass after good fit with vegetation and search for correct offset?
publicdoubleterr_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
...
...
@@ -783,6 +784,7 @@ min_str_neib_fpn 0.35
publicdoubleterr_boost_parallax=3.0;//
publicdoubleterr_max_parallax=10.0;// parallax limit when evaluating boost parallax
publicdoubleterr_hifreq_weight=10.0;// 22.5; // 0 - do not use high-freq. Relative weight of laplacian components differfences to the DC ones
publicdoubleterr_hiterr_weight=1.0;// integrated difference for combined hi-freq over all scenes
publicdoubleterr_reg_weights=0.25;// fraction of the total weight used for regularization
publicdoubleterr_lambda=5.0;//
publicdoubleterr_lambda_scale_good=0.5;
...
...
@@ -2035,6 +2037,7 @@ min_str_neib_fpn 0.35
gd.addNumericField("Scale alpha",terr_alpha_scale_avg,5,7,"","Scale target (average of neighbors) alpha before pulling to it (not used now).");
gd.addNumericField("Push alpha",terr_alpha_push,5,7,"","Quadratic loss for middle alpha (push to 0.0 or 1.0.");
gd.addNumericField("Neutral alpha",terr_alpha_push_neutral,5,7,"","Alpha point from which to push (default 0.5).");
gd.addNumericField("Alpha play",terr_alpha_push_play,5,7,"","Do not push alpha this below 1.0 (allow play).");
gd.addNumericField("Alpha center weight",terr_alpha_weight_center,5,7,"","Weight of center alpha pixel relative to each of the 4 ortho ones.");
gd.addCheckbox("Hole search enable",terr_en_holes,"Search for small semi-transparent holes, disable diffusion of local alpha minimums.");
gd.addNumericField("Alpha MM fraction",terr_alpha_mm_hole,5,7,"","Disable diffusion for local \"almost minimum\" (lower than this fraction between min and max neighbors).");
...
...
@@ -2048,6 +2051,7 @@ min_str_neib_fpn 0.35
gd.addNumericField("Boost parallax",terr_boost_parallax,5,7,"","Increase weight of scenes that have high parallax to the reference one.");
gd.addNumericField("Limit parallax",terr_max_parallax,5,7,"","Parallax limit when evaluating boost parallax.");
gd.addNumericField("High freq. weight",terr_hifreq_weight,5,7,"","Relative weight of laplacian components differfences to the DC ones (0 - do not use).");
gd.addNumericField("Terrain weight",terr_hiterr_weight,5,7,"","Amplifiy terrain mismatch - integrated over all scenes weight of laplacian components differfences to the DC ones (0 - do not use).");
gd.addNumericField("Losses weight",terr_reg_weights,5,7,"","Fraction of other losses compared to the RMSE.");
publicdoublehifreq_weight;// 22.5 0 - do not use high-freq. Relative weight of laplacian components
publicdoublehiterr_weight;// Amplifiy terrain mismatch - integrated over all scenes weight of laplacian components differfences to the DC ones (0 - do not use).
publicdoublereg_weights;// fraction of the total weight used for regularization
publicboolean[]fits;
...
...
@@ -133,7 +135,8 @@ public class VegetationLMA {
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_neutral=0.8;// alpha point from which push (closer to opaque)
publicdoublealpha_push_play=0.0;// no push for alpha this below 1.0
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
publicbooleanalpha_en_holes=true;// Search for small semi-transparent holes, disable diffusion of local alpha minimums
...
...
@@ -180,6 +183,10 @@ public class VegetationLMA {
privatedouble[][]last_jt=null;
publicbooleanskip_ref_scene=false;
publicbooleanclean_y=true;// only compare pixels that do not depend on vegetation outside of the woi
publicbooleanno_pull_fixed=true;// do not pull from fixed (npt parameters) terrain/vegetation/alpha/pixels
publicbooleandebug_deriv=true;
publicintdebug_width=12;
...
...
@@ -368,7 +375,7 @@ public class VegetationLMA {
finaldoubleterr_pull_cold,// pull vegetation to warm, terrain to cold
finaldoubledefault_alpha,
finaldoublehifreq_weight,// 22.5 0 - do not use high-freq. Relative weight of laplacian components
finaldoublehiterr_weight,// integrated difference for combined hi-freq over all scenes
finalbooleanfit_terr,
finalbooleanfit_veget,
finalbooleanfit_alpha,
...
...
@@ -383,6 +390,7 @@ public class VegetationLMA {
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_play,// no push for alpha this below 1.0
finaldoublealpha_push_center,// 1.5; // weight of center alpha pixel relative to each of the 4 ortho ones
finalbooleanalpha_en_holes,// Search for small semi-transparent holes, disable diffusion of local alpha minimums
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
...
...
@@ -406,6 +414,7 @@ public class VegetationLMA {
this.terr_difference=terr_difference;
this.terr_pull_cold=terr_pull_cold;
this.hifreq_weight=hifreq_weight;// 22.5 0 - do not use high-freq. Relative weight of laplacian components
this.hiterr_weight=hiterr_weight;// integrated difference for combined hi-freq over all scenes
fits=newboolean[TVAO_TYPES];
fits[TVAO_TERRAIN]=fit_terr;
...
...
@@ -422,6 +431,7 @@ public class VegetationLMA {
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_play=alpha_push_play;// 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_en_holes=alpha_en_holes;
this.alpha_mm_hole=alpha_mm_hole;
...
...
@@ -486,6 +496,7 @@ public class VegetationLMA {
setupDataSource(
(hifreq_weight>0),// final boolean use_hf,
// (hiterr_weight > 0), // final boolean use_terr_hf
min_samples_scene);// int min_samples_scene); // condensed
@@ -1402,6 +1402,7 @@ public class VegetationModel {
doublealpha_scale_avg=clt_parameters.imp.terr_alpha_scale_avg;// 1.0; // 1.1; // 0.9; // 2.0; // 1.5; // scale average alpha (around 0.5) when pulling to it
doublealpha_push=clt_parameters.imp.terr_alpha_push;// 12; // 10.0; // 15.0; // push from alpha==0.5
doublealpha_push_neutral=clt_parameters.imp.terr_alpha_push_neutral;// 0.5; // 0.6; // 0.8; // alpha point from which push (closer to opaque)
doublealpha_push_play=clt_parameters.imp.terr_alpha_push_play;// Do not push alpha this below 1.0 (allow play).
doublealpha_push_center=clt_parameters.imp.terr_alpha_weight_center;// 1.5; // weight of center alpha pixel relative to each of the 4 ortho ones
doublealpha_mm_hole=clt_parameters.imp.terr_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
...
...
@@ -1415,6 +1416,7 @@ public class VegetationModel {
doublehifreq_weight=clt_parameters.imp.terr_hifreq_weight;// 22.5; // 0 - do not use high-freq. Relative weight of laplacian components double reg_weights = 0.25; // fraction of the total weight used for regularization
doublehiterr_weight=clt_parameters.imp.terr_hiterr_weight;// integrated difference for combined hi-freq over all scenes
@@ -1927,14 +1929,15 @@ public class VegetationModel {
min_split_frac,// final double min_frac, // minimal modality fraction to use split by temperature
terr_difference,// final double terr_difference, // pull vegetation to be this warmer
terr_pull_cold,// final double terr_pull_cold, // pull vegetations to warm, terrain to cold
default_alpha,// final double default_alpha,
hifreq_weight,//final double hifreq_weight, // 22.5 0 - do not use high-freq. Relative weight of laplacian components
fit_terr,// final boolean adjust_terr,
fit_veget,// final boolean adjust_veget,
fit_alpha,// final boolean adjust_alpha,
fit_scenes,// final boolean adjust_scenes,
fit_elevations,// final boolean adjust_elevations,
reg_weights,// final double reg_weights, // fraction of the total weight used for regularization
default_alpha,// final double default_alpha,
hifreq_weight,//final double hifreq_weight, // 22.5 0 - do not use high-freq. Relative weight of laplacian components
hiterr_weight,// final double hiterr_weight, // integrated difference for combined hi-freq over all scenes
fit_terr,// final boolean adjust_terr,
fit_veget,// final boolean adjust_veget,
fit_alpha,// final boolean adjust_alpha,
fit_scenes,// final boolean adjust_scenes,
fit_elevations,// final boolean adjust_elevations,
reg_weights,// final double reg_weights, // fraction of the total weight used for regularization
alpha_loss,// final double alpha_loss, // quadratic loss when alpha reaches -1.0 or 2.0
alpha_offset,// final double alpha_offset, // quadratic loss when alpha reaches -1.0 or 2.0
alpha_lpf,// final double alpha_lpf, // pull to average of 4 neighbors
...
...
@@ -1942,6 +1945,7 @@ public class VegetationModel {
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_play,// final double alpha_push_play, // no push for alpha this below 1.0
alpha_push_center,// final double alpha_push_center,// 1.5; // weight of center alpha pixel relative to each of the 4 ortho ones
alpha_en_holes,// final boolean alpha_en_holes, // Search for small semi-transparent holes, disable diffusion of local alpha minimums
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