Commit 81d74a44 authored by Andrey Filippov's avatar Andrey Filippov

snapshot before interruption for proposals

parent b7a494a1
......@@ -987,6 +987,10 @@ public class ComboMatch {
double fill_fraction = clt_parameters.imp.pmtch_cent_fill; // should be populated not less than this
double fill_fraction_final = clt_parameters.imp.pmtch_cent_final; // should be populated not less than this during final pass
double ease_nosfm = clt_parameters.imp.pmtch_ease_nosfm; // ease metric_error when no SfM gain == 0;
double pull_skew = clt_parameters.imp.pmtch_pull_skew; // ~rotation, = 0 fraction of the total weight == 1
double pull_tilt = clt_parameters.imp.pmtch_pull_tilt; // > 0
double pull_scale = clt_parameters.imp.pmtch_pull_scale; // = 0
for (int zi = 0; zi < zooms.length; zi++) {
zoom_lev = zooms[zi];
if (zoom_lev >=1000) {
......@@ -998,6 +1002,7 @@ public class ComboMatch {
}
// will modify affines[1], later add jtj, weight, smth. else?
PairwiseOrthoMatch pmatch = process_correlation? pairwiseOrthoMatch: null;
FineXYCorr warp = maps_collection.correlateOrthoPair(
clt_parameters, // CLTParameters clt_parameters,
(process_correlation? pairwiseOrthoMatch: null), //PairwiseOrthoMatch pairwiseOrthoMatch, // will return statistics
......@@ -1022,6 +1027,9 @@ public class ComboMatch {
fill_fraction_final, // double fill_fraction_final,
ease_nosfm, // double ease_nosfm,
null, // double [] max_rms_iter, // = {1.0, 0.6};//
pull_skew, // double pull_skew, // ~rotation, = 0 fraction of the total weight == 1
pull_tilt, // double pull_tilt, // > 0
pull_scale, // double pull_scale, // = 0
debugLevel); // final int debugLevel)
if ((warp == null) || ((pmatch != null) && Double.isNaN(pmatch.rms))) {
System.out.println("Failed correlateOrthoPair()");
......@@ -1153,6 +1161,9 @@ public class ComboMatch {
double fill_fraction = clt_parameters.imp.pmtch_cent_fill; // should be populated not less than this
double fill_fraction_final = clt_parameters.imp.pmtch_cent_final; // should be populated not less than this during final pass
double ease_nosfm = clt_parameters.imp.pmtch_ease_nosfm; // ease metric_error when no SfM gain == 0;
double pull_skew = clt_parameters.imp.pmtch_pull_skew; // ~rotation, = 0 fraction of the total weight == 1
double pull_tilt = clt_parameters.imp.pmtch_pull_tilt; // > 0
double pull_scale = clt_parameters.imp.pmtch_pull_scale; // = 0
GenericJTabbedDialog gd = new GenericJTabbedDialog("Setup Spiral Match",1200,350);
if (pairwiseOrthoMatch != null) {
......@@ -1185,6 +1196,9 @@ public class ComboMatch {
gd.addNumericField("Central area minimal fill", fill_fraction, 3,7,"", "Central area minimal fill for all but the last iteration.");
gd.addNumericField("Central area minimal fill final", fill_fraction_final, 3,7,"", "Central area minimal fill for the last iteration.");
gd.addNumericField("Relax metric error for no-SfM", ease_nosfm, 3,7,"", "Relax metric error for no-SfM scenes (sfm_gain==0).");
gd.addNumericField("Pull skew (rotation)", pull_skew, 3,7,"", "Prevent pairwise match from rotation.");
gd.addNumericField("Pull tilt", pull_tilt, 3,7,"", "Prevent pairwise match from tilt.");
gd.addNumericField("Pull scale", pull_scale, 3,7,"", "Prevent pairwise match from scaling.");
gd.showDialog();
......@@ -1214,6 +1228,9 @@ public class ComboMatch {
fill_fraction= gd.getNextNumber();
fill_fraction_final= gd.getNextNumber();
ease_nosfm= gd.getNextNumber();
pull_skew = gd.getNextNumber();
pull_tilt = gd.getNextNumber();
pull_scale = gd.getNextNumber();
if (use_existing_pair) {
if (invert_exixting_pair) {
......@@ -1254,6 +1271,9 @@ public class ComboMatch {
ignore_rms, // boolean ignore_rms,
null,//double [] max_rms_iter, // = {1.0, 0.6};//
1.0, // double overlap,
pull_skew, // double pull_skew, // ~rotation, = 0 fraction of the total weight == 1
pull_tilt, // double pull_tilt, // > 0
pull_scale, // double pull_scale, // = 0
spiral_debug); // int debugLevel){
if (log_append && (log_path != null)) { // assuming directory exists
StringBuffer sb = new StringBuffer();
......
......@@ -120,6 +120,10 @@ public class IntersceneMatchParameters {
public boolean pmtch_ignore_rms = true;
public int pmtch_num_iter = 10;
public double pmtch_pull_skew = 0.0; // ~rotation, = 0 fraction of the total weight == 1
public double pmtch_pull_tilt = 0.1; // > 0
public double pmtch_pull_scale = 0.0; // = 0
public double pmtch_cent_rad = 0.6; // center circle radius fraction of 0.5* min(width, height) in tiles
public double pmtch_max_cent_rad =40; // 30; // maximal center radius in tiles (limit pmtch_cent_rad)
public double pmtch_cent_fill = 0.2; // 25; // should be populated not less than this
......@@ -782,6 +786,11 @@ public class IntersceneMatchParameters {
gd.addNumericField("Central area minimal radius", this.pmtch_min_std_rad, 3,7,"tile", "Minimal radius of the central area after all LMA passes.");
gd.addCheckbox ("Ignore previous RMSE", this.pmtch_ignore_rms, "Do not exit full fitting cycles if the RMSE worsened/not improved.");
gd.addNumericField("Number of fitting iterations", this.pmtch_num_iter, 0,3,"","number of full fittng iterations.");
gd.addNumericField("Pull skew (rotation)", this.pmtch_pull_skew, 3,7,"", "Prevent pairwise match from rotation.");
gd.addNumericField("Pull tilt", this.pmtch_pull_tilt, 3,7,"", "Prevent pairwise match from tilt.");
gd.addNumericField("Pull scale", this.pmtch_pull_scale, 3,7,"", "Prevent pairwise match from scaling.");
gd.addNumericField("Central area radius as fraction", this.pmtch_cent_rad, 3,7,"", "Central area radius as fraction of half minimal WOI dimension.");
gd.addNumericField("Maximal central area radius", this.pmtch_max_cent_rad, 3,7,"tiles", "Absolute limit to the center area radius (eases bad peripheral matching).");
gd.addNumericField("Central area minimal fill", this.pmtch_cent_fill, 3,7,"", "Central area minimal fill for all but the last iteration.");
......@@ -1701,6 +1710,11 @@ public class IntersceneMatchParameters {
this.pmtch_min_std_rad = gd.getNextNumber();
this.pmtch_ignore_rms = gd.getNextBoolean();
this.pmtch_num_iter = (int) gd.getNextNumber();
this.pmtch_pull_skew = gd.getNextNumber();
this.pmtch_pull_tilt = gd.getNextNumber();
this.pmtch_pull_scale = gd.getNextNumber();
this.pmtch_cent_rad = gd.getNextNumber();
this.pmtch_max_cent_rad = gd.getNextNumber();
this.pmtch_cent_fill = gd.getNextNumber();
......@@ -2229,6 +2243,11 @@ public class IntersceneMatchParameters {
properties.setProperty(prefix+"pmtch_min_std_rad", this.pmtch_min_std_rad +""); // double
properties.setProperty(prefix+"pmtch_ignore_rms", this.pmtch_ignore_rms +""); // boolean
properties.setProperty(prefix+"pmtch_num_iter", this.pmtch_num_iter +""); // int
properties.setProperty(prefix+"pmtch_pull_skew", this.pmtch_pull_skew + ""); // double
properties.setProperty(prefix+"pmtch_pull_tilt", this.pmtch_pull_tilt + ""); // double
properties.setProperty(prefix+"pmtch_pull_scale", this.pmtch_pull_scale + ""); // double
properties.setProperty(prefix+"pmtch_cent_rad", this.pmtch_cent_rad + ""); // double
properties.setProperty(prefix+"pmtch_max_cent_rad", this.pmtch_max_cent_rad + ""); // double
properties.setProperty(prefix+"pmtch_cent_fill", this.pmtch_cent_fill + ""); // double
......@@ -2723,6 +2742,11 @@ public class IntersceneMatchParameters {
if (properties.getProperty(prefix+"pmtch_min_std_rad")!=null) this.pmtch_min_std_rad=Double.parseDouble(properties.getProperty(prefix+ "pmtch_min_std_rad"));
if (properties.getProperty(prefix+"pmtch_ignore_rms")!=null) this.pmtch_ignore_rms= Boolean.parseBoolean(properties.getProperty(prefix+"pmtch_ignore_rms"));
if (properties.getProperty(prefix+"pmtch_num_iter")!=null) this.pmtch_num_iter= Integer.parseInt(properties.getProperty(prefix+ "pmtch_num_iter"));
if (properties.getProperty(prefix+"pmtch_pull_skew")!=null) this.pmtch_pull_skew= Double.parseDouble(properties.getProperty(prefix+ "pmtch_pull_skew"));
if (properties.getProperty(prefix+"pmtch_pull_tilt")!=null) this.pmtch_pull_tilt= Double.parseDouble(properties.getProperty(prefix+ "pmtch_pull_tilt"));
if (properties.getProperty(prefix+"pmtch_pull_scale")!=null) this.pmtch_pull_scale= Double.parseDouble(properties.getProperty(prefix+ "pmtch_pull_scale"));
if (properties.getProperty(prefix+"pmtch_cent_rad" )!=null) this.pmtch_cent_rad= Double.parseDouble(properties.getProperty(prefix+ "pmtch_cent_rad"));
if (properties.getProperty(prefix+"pmtch_max_cent_rad")!=null) this.pmtch_max_cent_rad=Double.parseDouble(properties.getProperty(prefix+ "pmtch_max_cent_rad"));
if (properties.getProperty(prefix+"pmtch_cent_fill" )!=null) this.pmtch_cent_fill= Double.parseDouble(properties.getProperty(prefix+ "pmtch_cent_fill"));
......@@ -3243,6 +3267,9 @@ public class IntersceneMatchParameters {
imp.pmtch_min_std_rad = this.pmtch_min_std_rad;
imp.pmtch_ignore_rms = this.pmtch_ignore_rms;
imp.pmtch_num_iter = this.pmtch_num_iter;
imp.pmtch_pull_skew = this.pmtch_pull_skew;
imp.pmtch_pull_tilt = this.pmtch_pull_tilt;
imp.pmtch_pull_scale = this.pmtch_pull_scale;
imp.pmtch_cent_rad = this.pmtch_cent_rad;
imp.pmtch_max_cent_rad = this.pmtch_max_cent_rad;
imp.pmtch_cent_fill = this.pmtch_cent_fill;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment