publicdoubleterr_alpha_offset=0.1;// alpha offset near alpha ~=1.0
publicdoubleterr_alpha_0offset=0.0;// New - a separate alpha offset nea alpha ~= 0.0
publicdoubleterr_alpha_min_veg=-1;// old version 0.5; // Minimal vegetation alpha. If (alpha-alpha_offset)/(1-2*alpha_offset) < alpha_min_veg, pull down to lpha_offset
publicdoubleterr_alpha_min_veg=-1;// old version 0.5; // Minimal vegetation alpha. If (alpha-alpha_offset)/(1-2*alpha_offset) < alpha_min_veg, pull down to lpha_offset
@@ -829,6 +830,22 @@ min_str_neib_fpn 0.35
publicdoubleterr_elev_alpha_pwr=2.0;// raise alpha to this power (when alpha > 0)
publicdoubleterr_elev_alpha_pwr=2.0;// raise alpha to this power (when alpha > 0)
publicdoubleterr_low_veget=2.0;// (pix) Elevation considered low (lower loss for high alpha)
publicdoubleterr_low_veget=2.0;// (pix) Elevation considered low (lower loss for high alpha)
publicdoubleterr_scenes_pull0=1.0;// pull average scene offset to zero
publicdoubleterr_scenes_pull0=1.0;// pull average scene offset to zero
// scaling elevation losses for high elevations (decrease pull and/or lpf for high elevations)
publicdoubleterr_elev_scale_thresh=1.0;// reduce losses for higher (initial) elevations TODO: consider actual elevations
publicbooleanterr_elev_scale_pull=false;// scale elevation pull losses for high elevations
publicbooleanterr_elev_scale_lpf=false;// scale elevation diffusion losses for high elevations
// tree-top removal
publicbooleanterr_ttop_en=false;// remove tree tops from transparency weights
publicdoubleterr_ttop_gb=1.0;// Elevation Gaussian blur sigma to detect tree tops
publicdoubleterr_ttop_min=3.0;// Minimal tree top elevation
publicdoubleterr_ttop_rel_lev=0.9;// Relative (to the top height) sample level
publicdoubleterr_ttop_rel_rad=0.25;// Relative (to the top height) sample ring radius
publicdoubleterr_ttop_frac=0.5;// Minimal fraction of the ring pixels below sample level
publicdoubleterr_ttop_rem_rad=0.25;// Relative (to the top height) remove transparency radius
// LMA parameters
// LMA parameters
publicdoubleterr_boost_parallax=3.0;//
publicdoubleterr_boost_parallax=3.0;//
@@ -2134,7 +2151,8 @@ min_str_neib_fpn 0.35
gd.addNumericField("Alpha loss",terr_alpha_loss,5,7,"","Alpha quadratic growing loss for when out of [0,1] range");
gd.addNumericField("Alpha loss",terr_alpha_loss,5,7,"","Alpha quadratic growing loss for when out of [0,1] range");
gd.addNumericField("Alpha loss linear",terr_alpha_loss_lin,5,7,"","Alpha linear growing loss for when out of [0,1] range and below minimal vegetation alpha.");
gd.addNumericField("Alpha loss linear",terr_alpha_loss_lin,5,7,"","Alpha linear growing loss for when out of [0,1] range and below minimal vegetation alpha.");
gd.addNumericField("Alpha offset",terr_alpha_offset,5,7,"","Start alpha losses above 0.0 and below 1.0 by this value.");
gd.addNumericField("Alpha offset @1.0",terr_alpha_offset,5,7,"","Start alpha losses below 1.0 by this value.");
gd.addNumericField("Alpha offset @0.0",terr_alpha_0offset,5,7,"","Start alpha losses above 0.0 by this value.");
gd.addNumericField("Minimal vegetation alpha",terr_alpha_min_veg,5,7,"","Minimal vegetation alpha. If (alpha-alpha_offset)/(1-2*alpha_offset) < alpha_min_veg, pull down to lpha_offset.");
gd.addNumericField("Minimal vegetation alpha",terr_alpha_min_veg,5,7,"","Minimal vegetation alpha. If (alpha-alpha_offset)/(1-2*alpha_offset) < alpha_min_veg, pull down to lpha_offset.");
gd.addNumericField("Alpha diffusion",terr_alpha_lpf,5,7,"","Alpha diffusion to 4 ortho neighbors.");
gd.addNumericField("Alpha diffusion",terr_alpha_lpf,5,7,"","Alpha diffusion to 4 ortho neighbors.");
@@ -2159,9 +2177,23 @@ min_str_neib_fpn 0.35
gd.addNumericField("Low vegetation loss",terr_elev_alpha,5,7,"","Multiply alpha by under-low elevation for loss.");
gd.addNumericField("Low vegetation loss",terr_elev_alpha,5,7,"","Multiply alpha by under-low elevation for loss.");
gd.addNumericField("Low vegetation power",terr_elev_alpha_pwr,5,7,"","Raise alpha to this power for low vegetation loss.");
gd.addNumericField("Low vegetation power",terr_elev_alpha_pwr,5,7,"","Raise alpha to this power for low vegetation loss.");
gd.addNumericField("Low elevation",terr_low_veget,5,7,"pix","Elevation considered low (lower loss for high alpha.");
gd.addNumericField("Low elevation",terr_low_veget,5,7,"pix","Elevation considered low (lower loss for high alpha.");
gd.addNumericField("Pull scene offset",terr_scenes_pull0,5,7,"","Pull average scene offset to zero.");
gd.addNumericField("Pull scene offset",terr_scenes_pull0,5,7,"","Pull average scene offset to zero.");
// scaling elevation losses for high elevations (decrease pull and/or lpf for high elevations)
gd.addNumericField("High elevation",terr_elev_scale_thresh,5,7,"","Reduce losses for higher (initial) elevations threshold.");
gd.addCheckbox("High elevation pull",terr_elev_scale_pull,"Scale elevation pull losses for high elevations.");
gd.addCheckbox("High elevation diffusion",terr_elev_scale_lpf,"Scale elevation diffusion losses for high elevations.");
gd.addMessage("Tree tops detection/filtering - no (stray) transparency around tree tops");
gd.addCheckbox("Filter tree tops",terr_ttop_en,"Filter tree tops transparency.");
gd.addNumericField("Elevation blur sigma",terr_ttop_gb,5,7,"","Elevation Gaussian blur sigma to detect tree tops.");
gd.addNumericField("Minimal tree top elevation",terr_ttop_min,5,7,"","Minimal tree top elevation.");
gd.addNumericField("Relative sample level",terr_ttop_rel_lev,5,7,"","Relative (to the top height) sample level.");
gd.addNumericField("Relative ring radius",terr_ttop_rel_rad,5,7,"","Relative (to the top height) sample ring radius.");
gd.addNumericField("Minimal fraction lower",terr_ttop_frac,5,7,"","Minimal fraction of the ring pixels below sample level.");
gd.addNumericField("Remove transparency radius",terr_ttop_rem_rad,5,7,"","Relative (to the top height) remove transparency radius.");
gd.addMessage("LMA parameters");
gd.addMessage("LMA parameters");
gd.addNumericField("Boost parallax",terr_boost_parallax,5,7,"","Increase weight of scenes that have high parallax to the reference one.");
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("Limit parallax",terr_max_parallax,5,7,"","Parallax limit when evaluating boost parallax.");