publicdoubleterr_min_split_frac=0.15;// minimal modality fraction to use split by temperature
publicdoubleterr_difference=100.0;// vegetation is 100 warmer (target)
publicdoubleterr_pull_cold=0.001;// pull vegetations to warm, terrain to cold
publicdoubleterr_alpha_dflt=0.5;
publicdoubleterr_alpha_loss=100.0;
publicdoubleterr_alpha_offset=0.0;
...
...
@@ -761,6 +769,7 @@ min_str_neib_fpn 0.35
// LMA parameters
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_reg_weights=0.25;// fraction of the total weight used for regularization
publicdoubleterr_lambda=5.0;//
publicdoubleterr_lambda_scale_good=0.5;
...
...
@@ -1980,6 +1989,12 @@ min_str_neib_fpn 0.35
gd.addNumericField("Minimal samples/scene",terr_min_samples_scene,0,3,"","Minimal samples per scene used for fitting (skip scene if less).");
gd.addNumericField("Minimum scenes used",terr_min_total_scenes,0,3,"","Minimal total number of scenes used (skip segment if less).");
gd.addNumericField("Minimal pixels fitted",terr_min_pixels,0,3,"","Minimal number of terrain and vegetation pixels used for fitting in this segment(skip segment if less).");
gd.addCheckbox("Start by temperature",terr_warm_veget,"Start with vegetation warmer than terrain.");
gd.addNumericField("Min. split fraction",terr_min_split_frac,5,7,"","minimal modality fraction to use split by temperature (otherwise use default alpha).");
gd.addNumericField("Vegetation warmer",terr_difference,5,7,"","Pull vegetation to be this warmer.");
gd.addNumericField("Pull terrain cold",terr_pull_cold,5,7,"","Pull vegetations to warm, terrain to cold.");
gd.addNumericField("Alpha loss",terr_alpha_loss,5,7,"","Alpha quadratic growing loss for when out of [0,1] range");
gd.addNumericField("Alpha offset",terr_alpha_offset,5,7,"","Start alpha losses above 0.0 and below 1.0 by this value.");
...
...
@@ -1999,6 +2014,8 @@ min_str_neib_fpn 0.35
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("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("Losses weight",terr_reg_weights,5,7,"","Fraction of other losses compared to the RMSE.");
publicstaticfinalintDATA_SOURCE_CORN_VEGET=1;// [4]/null Z-shape 4 corners vegetation, either >= as parameter index or -1 - (x + image_width*y) of the unmodified full index
publicstaticfinalintDATA_SOURCE_CORN_ALPHA=2;// [4]/null Z-shape 4 corners vegetation alpha, either >= as parameter index or -1 - (x + image_width*y) of the unmodified full index
publicstaticfinalintDATA_SOURCE_NEIB=3;// [4]/null or 4 neighbors (CW), either y_vector index or -1 -(x + image_width*y) of the unmodified terrain
@@ -2583,16 +2839,6 @@ public class VegetationLMA {
}
}
/*
*
used_scenes_indices = new int [num_used_scenes];
int indx = 0;
for (int nscene = 0; nscene < num_scenes; nscene++) {
if (used_scenes[nscene]) {
used_scenes_indices[indx++] = nscene;
}
}
*/
data_source=newint[num_samples][][];
corners_weights=newdouble[num_samples][];
ai.set(0);
...
...
@@ -2605,7 +2851,8 @@ public class VegetationLMA {
if(data_src[nScene][windx]!=null){
corners_weights[out_indx]=corn_w[nScene][windx];
int[][]dsrc=data_src[nScene][windx];
dsrc[0][3]=ind_pars_scenes+used_scene_indices[dsrc[0][3]];// replace scene number with the corresponding parameter index
// dsrc[0][3] = ind_pars_scenes + used_scene_indices[dsrc[0][3]]; // replace scene number with the corresponding parameter index
dsrc[DATA_SOURCE_HEAD][DATA_SOURCE_HEAD_SINDEX]=ind_pars_scenes+used_scene_indices[dsrc[DATA_SOURCE_HEAD][DATA_SOURCE_HEAD_SINDEX]];// replace scene number with the corresponding parameter index
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
doublereg_weights=clt_parameters.imp.terr_reg_weights;// 0.25; // fraction of the total weight used for regularization