Loading src/main/java/com/elphel/imagej/tileprocessor/IntersceneLma.java +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ public class IntersceneLma { ) { this.thread_invariant = thread_invariant; this.num_components = (disparity_weight > 0) ? 3 : 2; this.disparity_weight = disparity_weight; } public int getNumComponents() { Loading src/main/java/com/elphel/imagej/tileprocessor/IntersceneLmaParameters.java +26 −2 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ public class IntersceneLmaParameters { public boolean ilma_thread_invariant = true; // Do not use DoubleAdder, provide results not dependent on threads public boolean [] ilma_lma_select = new boolean [ErsCorrection.DP_NUM_PARS]; // first three will not be used public double [] ilma_regularization_weights = new double [ErsCorrection.DP_NUM_PARS]; // first three will not be used public double [] ilma_regularization_weights0 = new double [ErsCorrection.DP_NUM_PARS]; // Use after spiral public boolean ilma_translation_priority = false; // expect translation for thepre-ref scene to be probable than rotation public boolean ilma_ignore_ers = false; // ignore linear and angular velocities, assume tham zeroes public boolean ilma_ers_adj_lin = false; // adjust linear ERS for scene-to-ref (LWIR does not work, check with high-speed) public boolean ilma_ers_adj_ang = false; // adjust angular ERS for scene-to-ref (LWIR does not work, check with high-speed) Loading Loading @@ -107,6 +109,7 @@ public class IntersceneLmaParameters { ilma_regularization_weights[ErsCorrection.DP_DSX]= 0.0; ilma_regularization_weights[ErsCorrection.DP_DSY]= 0.0; ilma_regularization_weights[ErsCorrection.DP_DSZ]= 0.0; ilma_regularization_weights0 = ilma_regularization_weights.clone(); } public void dialogQuestions(GenericJTabbedDialog gd) { Loading @@ -132,6 +135,15 @@ public class IntersceneLmaParameters { "Weight of "+ErsCorrection.DP_DERIV_NAMES[i]+" pull, 1.0 means that the paramter offset from initial corresponding to 1 image pixel\n"+ " will cause error equal to all reprojection ones"); } gd.addMessage("Regularization parameters to be used first after spiral"); for (int i = ErsCorrection.DP_DVAZ; i < ErsCorrection.DP_NUM_PARS; i++) { gd.addNumericField(ErsCorrection.DP_DERIV_NAMES[i], this.ilma_regularization_weights0[i], 6,8,"", "Weight of "+ErsCorrection.DP_DERIV_NAMES[i]+" pull, 1.0 means that the paramter offset from initial corresponding to 1 image pixel\n"+ " will cause error equal to all reprojection ones"); } gd.addCheckbox ("Expect translation not rotation", this.ilma_translation_priority, "Expect translation to be more likely than rotation for the first movement after the spiral search" ); gd.addMessage("LMA other parameters"); gd.addCheckbox ("Ignore linear and angular velocities", this.ilma_ignore_ers, "Ignore calculated linear and angular velocities when correlating scenes to the reference one" ); Loading Loading @@ -187,6 +199,10 @@ public class IntersceneLmaParameters { for (int i = ErsCorrection.DP_DVAZ; i < ErsCorrection.DP_NUM_PARS; i++) { this.ilma_regularization_weights[i] = gd.getNextNumber(); } for (int i = ErsCorrection.DP_DVAZ; i < ErsCorrection.DP_NUM_PARS; i++) { this.ilma_regularization_weights0[i] = gd.getNextNumber(); } this.ilma_translation_priority = gd.getNextBoolean(); this.ilma_ignore_ers = gd.getNextBoolean(); this.ilma_ers_adj_lin = gd.getNextBoolean(); this.ilma_ers_adj_ang = gd.getNextBoolean(); Loading Loading @@ -216,7 +232,9 @@ public class IntersceneLmaParameters { for (int i = ErsCorrection.DP_DVAZ; i < ErsCorrection.DP_NUM_PARS; i++) { properties.setProperty(prefix+ErsCorrection.DP_DERIV_NAMES[i]+"_sel", this.ilma_lma_select[i]+""); properties.setProperty(prefix+ErsCorrection.DP_DERIV_NAMES[i]+"_regweight", this.ilma_regularization_weights[i]+""); properties.setProperty(prefix+ErsCorrection.DP_DERIV_NAMES[i]+"_regweight0", this.ilma_regularization_weights0[i]+""); } properties.setProperty(prefix+"ilma_translation_priority", this.ilma_translation_priority+""); properties.setProperty(prefix+"ilma_ignore_ers", this.ilma_ignore_ers+""); properties.setProperty(prefix+"ilma_ers_adj_lin", this.ilma_ers_adj_lin+""); properties.setProperty(prefix+"ilma_ers_adj_ang", this.ilma_ers_adj_ang+""); Loading Loading @@ -247,7 +265,11 @@ public class IntersceneLmaParameters { if (properties.getProperty(pn_sel)!=null) this.ilma_lma_select[i]=Boolean.parseBoolean(properties.getProperty(pn_sel)); pn_sel = prefix+ErsCorrection.DP_DERIV_NAMES[i]+"_regweight"; if (properties.getProperty(pn_sel)!=null) this.ilma_regularization_weights[i]=Double.parseDouble(properties.getProperty(pn_sel)); pn_sel = prefix+ErsCorrection.DP_DERIV_NAMES[i]+"_regweight0"; if (properties.getProperty(pn_sel)!=null) this.ilma_regularization_weights0[i]=Double.parseDouble(properties.getProperty(pn_sel)); } // if (properties.getProperty(prefix+"ilma_translation_priority")!=null)this.ilma_translation_priority=Boolean.parseBoolean(properties.getProperty(prefix+"ilma_translation_priority")); if (properties.getProperty(prefix+"ilma_ignore_ers")!=null) this.ilma_ignore_ers=Boolean.parseBoolean(properties.getProperty(prefix+"ilma_ignore_ers")); if (properties.getProperty(prefix+"ilma_ers_adj_lin")!=null) this.ilma_ers_adj_lin=Boolean.parseBoolean(properties.getProperty(prefix+"ilma_ers_adj_lin")); if (properties.getProperty(prefix+"ilma_ers_adj_ang")!=null) this.ilma_ers_adj_ang=Boolean.parseBoolean(properties.getProperty(prefix+"ilma_ers_adj_ang")); Loading Loading @@ -287,6 +309,8 @@ public class IntersceneLmaParameters { ilp.ilma_thread_invariant = this.ilma_thread_invariant; System.arraycopy(this.ilma_lma_select, 0, ilp.ilma_lma_select, 0, ilma_lma_select.length); System.arraycopy(this.ilma_regularization_weights, 0, ilp.ilma_regularization_weights, 0, ilma_regularization_weights.length); System.arraycopy(this.ilma_regularization_weights0,0, ilp.ilma_regularization_weights0, 0, ilma_regularization_weights0.length); ilp.ilma_translation_priority =this.ilma_translation_priority; ilp.ilma_ignore_ers = this.ilma_ignore_ers; ilp.ilma_ers_adj_lin = this.ilma_ers_adj_lin; ilp.ilma_ers_adj_ang = this.ilma_ers_adj_ang; Loading src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java +10 −2 Original line number Diff line number Diff line Loading @@ -238,7 +238,8 @@ public class IntersceneMatchParameters { public double half_avg_diff = 0.2; // when L2 of x,y difference from average of neibs - reduce twice // Detect initial match public double min_ref_str = 0.15; // 0.22; // For orientations: use only tiles of the reference scene DSI_MAIN is stronger public double min_ref_str = 0.33; // 0.22; // For orientations: use only tiles of the reference scene DSI_MAIN is stronger public double min_ref_frac = 0.2; // 0.22; if fraction number of reliable tiles is less than this, use best possible public int pix_step = 4; // Azimuth/tilt search step in pixels public int search_rad = 10; // Search radius in steps public double maybe_sum = 1.0; // minimal sum of strengths (will search for the best) Loading Loading @@ -759,6 +760,8 @@ public class IntersceneMatchParameters { gd.addMessage ("Initial search for the inter-scene match"); gd.addNumericField("DSI_MAIN minimal strength", this.min_ref_str, 5,7,"", "Match only tiles where DSI_MAIN is stronger than that (and has LMA)."); gd.addNumericField("DSI_MAIN minimal fraction", this.min_ref_frac, 5,7,"", "If relative number of the reliable tiles is less than this - use this best fraction."); gd.addNumericField("Azimuth/tilt step", this.pix_step, 0,3,"pix", "Search in a spiral starting with no-shift with this step between probes, in approximate pixels"); Loading Loading @@ -1169,6 +1172,7 @@ public class IntersceneMatchParameters { this.half_disparity = gd.getNextNumber(); this.half_avg_diff = gd.getNextNumber(); this.min_ref_str = gd.getNextNumber(); this.min_ref_frac = gd.getNextNumber(); this.pix_step = (int) gd.getNextNumber(); this.search_rad = (int) gd.getNextNumber(); this.maybe_sum = gd.getNextNumber(); Loading Loading @@ -1492,6 +1496,7 @@ public class IntersceneMatchParameters { properties.setProperty(prefix+"centroid_radius", this.centroid_radius+""); // double properties.setProperty(prefix+"n_recenter", this.n_recenter+""); // int properties.setProperty(prefix+"min_ref_str", this.min_ref_str+""); // double properties.setProperty(prefix+"min_ref_frac", this.min_ref_frac+""); // double properties.setProperty(prefix+"td_weight", this.td_weight+""); // double properties.setProperty(prefix+"pd_weight", this.pd_weight+""); // double properties.setProperty(prefix+"td_nopd_only", this.td_nopd_only+""); // boolean Loading Loading @@ -1784,6 +1789,7 @@ public class IntersceneMatchParameters { if (properties.getProperty(prefix+"centroid_radius")!=null) this.centroid_radius=Double.parseDouble(properties.getProperty(prefix+"centroid_radius")); if (properties.getProperty(prefix+"n_recenter")!=null) this.n_recenter=Integer.parseInt(properties.getProperty(prefix+"n_recenter")); if (properties.getProperty(prefix+"min_ref_str")!=null) this.min_ref_str=Double.parseDouble(properties.getProperty(prefix+"min_ref_str")); if (properties.getProperty(prefix+"min_ref_frac")!=null) this.min_ref_frac=Double.parseDouble(properties.getProperty(prefix+"min_ref_frac")); if (properties.getProperty(prefix+"td_weight")!=null) this.td_weight=Double.parseDouble(properties.getProperty(prefix+"td_weight")); if (properties.getProperty(prefix+"pd_weight")!=null) this.pd_weight=Double.parseDouble(properties.getProperty(prefix+"pd_weight")); if (properties.getProperty(prefix+"td_nopd_only")!=null) this.td_nopd_only=Boolean.parseBoolean(properties.getProperty(prefix+"td_nopd_only")); Loading Loading @@ -2086,6 +2092,8 @@ public class IntersceneMatchParameters { imp.centroid_radius = this.centroid_radius; imp.n_recenter = this.n_recenter; imp.min_ref_str = this.min_ref_str; imp.min_ref_frac = this.min_ref_frac; imp.td_weight = this.td_weight; imp.pd_weight = this.pd_weight; imp.td_nopd_only = this.td_nopd_only; Loading Loading
src/main/java/com/elphel/imagej/tileprocessor/IntersceneLma.java +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ public class IntersceneLma { ) { this.thread_invariant = thread_invariant; this.num_components = (disparity_weight > 0) ? 3 : 2; this.disparity_weight = disparity_weight; } public int getNumComponents() { Loading
src/main/java/com/elphel/imagej/tileprocessor/IntersceneLmaParameters.java +26 −2 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ public class IntersceneLmaParameters { public boolean ilma_thread_invariant = true; // Do not use DoubleAdder, provide results not dependent on threads public boolean [] ilma_lma_select = new boolean [ErsCorrection.DP_NUM_PARS]; // first three will not be used public double [] ilma_regularization_weights = new double [ErsCorrection.DP_NUM_PARS]; // first three will not be used public double [] ilma_regularization_weights0 = new double [ErsCorrection.DP_NUM_PARS]; // Use after spiral public boolean ilma_translation_priority = false; // expect translation for thepre-ref scene to be probable than rotation public boolean ilma_ignore_ers = false; // ignore linear and angular velocities, assume tham zeroes public boolean ilma_ers_adj_lin = false; // adjust linear ERS for scene-to-ref (LWIR does not work, check with high-speed) public boolean ilma_ers_adj_ang = false; // adjust angular ERS for scene-to-ref (LWIR does not work, check with high-speed) Loading Loading @@ -107,6 +109,7 @@ public class IntersceneLmaParameters { ilma_regularization_weights[ErsCorrection.DP_DSX]= 0.0; ilma_regularization_weights[ErsCorrection.DP_DSY]= 0.0; ilma_regularization_weights[ErsCorrection.DP_DSZ]= 0.0; ilma_regularization_weights0 = ilma_regularization_weights.clone(); } public void dialogQuestions(GenericJTabbedDialog gd) { Loading @@ -132,6 +135,15 @@ public class IntersceneLmaParameters { "Weight of "+ErsCorrection.DP_DERIV_NAMES[i]+" pull, 1.0 means that the paramter offset from initial corresponding to 1 image pixel\n"+ " will cause error equal to all reprojection ones"); } gd.addMessage("Regularization parameters to be used first after spiral"); for (int i = ErsCorrection.DP_DVAZ; i < ErsCorrection.DP_NUM_PARS; i++) { gd.addNumericField(ErsCorrection.DP_DERIV_NAMES[i], this.ilma_regularization_weights0[i], 6,8,"", "Weight of "+ErsCorrection.DP_DERIV_NAMES[i]+" pull, 1.0 means that the paramter offset from initial corresponding to 1 image pixel\n"+ " will cause error equal to all reprojection ones"); } gd.addCheckbox ("Expect translation not rotation", this.ilma_translation_priority, "Expect translation to be more likely than rotation for the first movement after the spiral search" ); gd.addMessage("LMA other parameters"); gd.addCheckbox ("Ignore linear and angular velocities", this.ilma_ignore_ers, "Ignore calculated linear and angular velocities when correlating scenes to the reference one" ); Loading Loading @@ -187,6 +199,10 @@ public class IntersceneLmaParameters { for (int i = ErsCorrection.DP_DVAZ; i < ErsCorrection.DP_NUM_PARS; i++) { this.ilma_regularization_weights[i] = gd.getNextNumber(); } for (int i = ErsCorrection.DP_DVAZ; i < ErsCorrection.DP_NUM_PARS; i++) { this.ilma_regularization_weights0[i] = gd.getNextNumber(); } this.ilma_translation_priority = gd.getNextBoolean(); this.ilma_ignore_ers = gd.getNextBoolean(); this.ilma_ers_adj_lin = gd.getNextBoolean(); this.ilma_ers_adj_ang = gd.getNextBoolean(); Loading Loading @@ -216,7 +232,9 @@ public class IntersceneLmaParameters { for (int i = ErsCorrection.DP_DVAZ; i < ErsCorrection.DP_NUM_PARS; i++) { properties.setProperty(prefix+ErsCorrection.DP_DERIV_NAMES[i]+"_sel", this.ilma_lma_select[i]+""); properties.setProperty(prefix+ErsCorrection.DP_DERIV_NAMES[i]+"_regweight", this.ilma_regularization_weights[i]+""); properties.setProperty(prefix+ErsCorrection.DP_DERIV_NAMES[i]+"_regweight0", this.ilma_regularization_weights0[i]+""); } properties.setProperty(prefix+"ilma_translation_priority", this.ilma_translation_priority+""); properties.setProperty(prefix+"ilma_ignore_ers", this.ilma_ignore_ers+""); properties.setProperty(prefix+"ilma_ers_adj_lin", this.ilma_ers_adj_lin+""); properties.setProperty(prefix+"ilma_ers_adj_ang", this.ilma_ers_adj_ang+""); Loading Loading @@ -247,7 +265,11 @@ public class IntersceneLmaParameters { if (properties.getProperty(pn_sel)!=null) this.ilma_lma_select[i]=Boolean.parseBoolean(properties.getProperty(pn_sel)); pn_sel = prefix+ErsCorrection.DP_DERIV_NAMES[i]+"_regweight"; if (properties.getProperty(pn_sel)!=null) this.ilma_regularization_weights[i]=Double.parseDouble(properties.getProperty(pn_sel)); pn_sel = prefix+ErsCorrection.DP_DERIV_NAMES[i]+"_regweight0"; if (properties.getProperty(pn_sel)!=null) this.ilma_regularization_weights0[i]=Double.parseDouble(properties.getProperty(pn_sel)); } // if (properties.getProperty(prefix+"ilma_translation_priority")!=null)this.ilma_translation_priority=Boolean.parseBoolean(properties.getProperty(prefix+"ilma_translation_priority")); if (properties.getProperty(prefix+"ilma_ignore_ers")!=null) this.ilma_ignore_ers=Boolean.parseBoolean(properties.getProperty(prefix+"ilma_ignore_ers")); if (properties.getProperty(prefix+"ilma_ers_adj_lin")!=null) this.ilma_ers_adj_lin=Boolean.parseBoolean(properties.getProperty(prefix+"ilma_ers_adj_lin")); if (properties.getProperty(prefix+"ilma_ers_adj_ang")!=null) this.ilma_ers_adj_ang=Boolean.parseBoolean(properties.getProperty(prefix+"ilma_ers_adj_ang")); Loading Loading @@ -287,6 +309,8 @@ public class IntersceneLmaParameters { ilp.ilma_thread_invariant = this.ilma_thread_invariant; System.arraycopy(this.ilma_lma_select, 0, ilp.ilma_lma_select, 0, ilma_lma_select.length); System.arraycopy(this.ilma_regularization_weights, 0, ilp.ilma_regularization_weights, 0, ilma_regularization_weights.length); System.arraycopy(this.ilma_regularization_weights0,0, ilp.ilma_regularization_weights0, 0, ilma_regularization_weights0.length); ilp.ilma_translation_priority =this.ilma_translation_priority; ilp.ilma_ignore_ers = this.ilma_ignore_ers; ilp.ilma_ers_adj_lin = this.ilma_ers_adj_lin; ilp.ilma_ers_adj_ang = this.ilma_ers_adj_ang; Loading
src/main/java/com/elphel/imagej/tileprocessor/IntersceneMatchParameters.java +10 −2 Original line number Diff line number Diff line Loading @@ -238,7 +238,8 @@ public class IntersceneMatchParameters { public double half_avg_diff = 0.2; // when L2 of x,y difference from average of neibs - reduce twice // Detect initial match public double min_ref_str = 0.15; // 0.22; // For orientations: use only tiles of the reference scene DSI_MAIN is stronger public double min_ref_str = 0.33; // 0.22; // For orientations: use only tiles of the reference scene DSI_MAIN is stronger public double min_ref_frac = 0.2; // 0.22; if fraction number of reliable tiles is less than this, use best possible public int pix_step = 4; // Azimuth/tilt search step in pixels public int search_rad = 10; // Search radius in steps public double maybe_sum = 1.0; // minimal sum of strengths (will search for the best) Loading Loading @@ -759,6 +760,8 @@ public class IntersceneMatchParameters { gd.addMessage ("Initial search for the inter-scene match"); gd.addNumericField("DSI_MAIN minimal strength", this.min_ref_str, 5,7,"", "Match only tiles where DSI_MAIN is stronger than that (and has LMA)."); gd.addNumericField("DSI_MAIN minimal fraction", this.min_ref_frac, 5,7,"", "If relative number of the reliable tiles is less than this - use this best fraction."); gd.addNumericField("Azimuth/tilt step", this.pix_step, 0,3,"pix", "Search in a spiral starting with no-shift with this step between probes, in approximate pixels"); Loading Loading @@ -1169,6 +1172,7 @@ public class IntersceneMatchParameters { this.half_disparity = gd.getNextNumber(); this.half_avg_diff = gd.getNextNumber(); this.min_ref_str = gd.getNextNumber(); this.min_ref_frac = gd.getNextNumber(); this.pix_step = (int) gd.getNextNumber(); this.search_rad = (int) gd.getNextNumber(); this.maybe_sum = gd.getNextNumber(); Loading Loading @@ -1492,6 +1496,7 @@ public class IntersceneMatchParameters { properties.setProperty(prefix+"centroid_radius", this.centroid_radius+""); // double properties.setProperty(prefix+"n_recenter", this.n_recenter+""); // int properties.setProperty(prefix+"min_ref_str", this.min_ref_str+""); // double properties.setProperty(prefix+"min_ref_frac", this.min_ref_frac+""); // double properties.setProperty(prefix+"td_weight", this.td_weight+""); // double properties.setProperty(prefix+"pd_weight", this.pd_weight+""); // double properties.setProperty(prefix+"td_nopd_only", this.td_nopd_only+""); // boolean Loading Loading @@ -1784,6 +1789,7 @@ public class IntersceneMatchParameters { if (properties.getProperty(prefix+"centroid_radius")!=null) this.centroid_radius=Double.parseDouble(properties.getProperty(prefix+"centroid_radius")); if (properties.getProperty(prefix+"n_recenter")!=null) this.n_recenter=Integer.parseInt(properties.getProperty(prefix+"n_recenter")); if (properties.getProperty(prefix+"min_ref_str")!=null) this.min_ref_str=Double.parseDouble(properties.getProperty(prefix+"min_ref_str")); if (properties.getProperty(prefix+"min_ref_frac")!=null) this.min_ref_frac=Double.parseDouble(properties.getProperty(prefix+"min_ref_frac")); if (properties.getProperty(prefix+"td_weight")!=null) this.td_weight=Double.parseDouble(properties.getProperty(prefix+"td_weight")); if (properties.getProperty(prefix+"pd_weight")!=null) this.pd_weight=Double.parseDouble(properties.getProperty(prefix+"pd_weight")); if (properties.getProperty(prefix+"td_nopd_only")!=null) this.td_nopd_only=Boolean.parseBoolean(properties.getProperty(prefix+"td_nopd_only")); Loading Loading @@ -2086,6 +2092,8 @@ public class IntersceneMatchParameters { imp.centroid_radius = this.centroid_radius; imp.n_recenter = this.n_recenter; imp.min_ref_str = this.min_ref_str; imp.min_ref_frac = this.min_ref_frac; imp.td_weight = this.td_weight; imp.pd_weight = this.pd_weight; imp.td_nopd_only = this.td_nopd_only; Loading