Commit ecbbff57 authored by Andrey Filippov's avatar Andrey Filippov

Improved reporting SVD for scene pairs, disabled pull in pairwise affine

fitting that cased anisotropic SVD beta. now - isotropic.
parent 6f3b31c5
......@@ -177,7 +177,7 @@ public class ComboMatch {
boolean use_saved_collection = true; // false;
boolean save_collection = false; // true;
boolean save_collection = true;
boolean process_correlation = true; // use false to save new version of data
int num_tries_fit = 10;
boolean update_match = true; // use false to save new version of data
......
......@@ -162,7 +162,7 @@ public class OrthoAltitudeMatch {
int [] ipair = {indices[cpair[0]], indices[cpair[1]]};
if (updateStatus) {
IJ.showStatus("Processing pair "+npair+" of "+condensed_pairs.length+" "+ipair[0]+"->"+ipair[1]);
IJ.showProgress(1.0*npair/condensed_pairs.length-1);
IJ.showProgress(1.0*npair/(condensed_pairs.length-1));
}
PairwiseOrthoMatch pairwiseOrthoMatch = ortho_maps[ipair[0]].getMatch(ortho_maps[ipair[1]].getName(), true); // ?
if (pairwiseOrthoMatch == null) {
......@@ -903,7 +903,7 @@ public class OrthoAltitudeMatch {
boolean last_run = false;
double rms_diff = 0.0001;
int num_iter = 20;
int num_iter = 100;
int lma_rslt=ersTiltLMA.runLma( // <0 - failed, >=0 iteration number (1 - immediately)
lambda, // double lambda, // 0.1
lambda_scale_good,// double lambda_scale_good,// 0.5
......@@ -923,7 +923,7 @@ public class OrthoAltitudeMatch {
}
}
System.out.println();
if (debugLevel > 1) {
if (debugLevel > 2) {
for (int npair = 0; npair < ersTiltLMA.num_pairs; npair++) {
double [][] pseudo_xy= ersTiltLMA.getPseudoXY(npair);
QuatUtils.testPseudoAffineDiffAndDerivatives(
......
......@@ -5155,15 +5155,19 @@ public class OrthoMapsCollection implements Serializable{
boolean flt_undef_only = false; // clt_parameters.imp.flt_undef_only; // false;
double flt_min_overlap = clt_parameters.imp.flt_min_overlap; // 0.0;
double flt_max_overlap = clt_parameters.imp.flt_max_overlap; // 1.0;
double flt_min_rms = 0; // clt_parameters.imp.flt_min_rms; // 0.0;
double flt_max_rms = 2.0; // clt_parameters.imp.flt_max_rms; // 2.0;
boolean flt_filt_zoom = clt_parameters.imp.flt_filt_zoom; // true;
int flt_min_zoom = clt_parameters.imp.flt_min_zoom; // -2;
int flt_max_zoom = clt_parameters.imp.flt_max_zoom; // 10;
double flt_min_sfm = clt_parameters.imp.flt_min_sfm; // 0.0;
double flt_max_sfm = clt_parameters.imp.flt_max_sfm; //1000.0;
int flt_alt = clt_parameters.imp.flt_alt; // 0;
// double flt_min_rms = 0; // clt_parameters.imp.flt_min_rms; // 0.0;
// double flt_max_rms = 2.0; // clt_parameters.imp.flt_max_rms; // 2.0;
double flt_min_rms = clt_parameters.imp.flt_min_rms; // 0.0;
double flt_max_rms = clt_parameters.imp.flt_max_rms; // 2.0;
boolean flt_nan_rms = true; // clt_parameters.imp.flt_nan_rms; // false;
boolean flt_show_names = true; // clt_parameters.imp.flt_show_names; // true;
boolean flt_show_overlaps = true; // clt_parameters.imp.flt_show_overlaps; // true;
boolean flt_show_rms = true; // clt_parameters.imp.flt_show_rms; // true;
......@@ -5213,6 +5217,11 @@ public class OrthoMapsCollection implements Serializable{
gdf.addNumericField("Maximal zoom", flt_max_zoom, 0,3,"","Maximal zoom level used for matching.");
gdf.addNumericField("Minimal SfM gain", flt_min_sfm, 3,7,"","Minimal SfM gain of the minimum in the scene pair.");
gdf.addNumericField("Maximal SfM gain", flt_max_sfm, 3,7,"","Maximal SfM gain of the minimum in the scene pair.");
gdf.addMessage("Normally, NaN RMS should be selected for new pairs. Other settings to re-adjust previously adjusted ones!!!");
gdf.addNumericField("Minimal RMSE", flt_min_rms, 3,7,"", "Minimal LMA RMSE of the scene pair.");
gdf.addNumericField("Maximal RMSE", flt_max_rms, 3,7,"", "Maximal LMA RMSE of the scene pair.");
gdf.addCheckbox ("NaN RMS (failed match)", flt_nan_rms, "Keep only failed matches with RMSE=NaN.");
gdf. addChoice("Filter by pairwise ALT availability",IntersceneMatchParameters.FLT_ALT_MODES, IntersceneMatchParameters.FLT_ALT_MODES[flt_alt],"Filter by pairwise ALT availability.");
gdf.addMessage("Low-resolution match parameters");
......@@ -5259,6 +5268,9 @@ public class OrthoMapsCollection implements Serializable{
flt_max_zoom = (int) gdf.getNextNumber();
flt_min_sfm = gdf.getNextNumber();
flt_max_sfm = gdf.getNextNumber();
flt_min_rms = gdf.getNextNumber();
flt_max_rms = gdf.getNextNumber();
flt_nan_rms = gdf.getNextBoolean();
flt_alt = gdf.getNextChoiceIndex();
ospir_augment = gdf.getNextBoolean();
max_rms = gdf.getNextNumber();
......@@ -5718,13 +5730,15 @@ public class OrthoMapsCollection implements Serializable{
int debugLevel) {
boolean batch_mode = true;
boolean show_vf = false;
boolean use_degrees = true;
double [][] ground_planes = null; // null or double[2] - will return ground planes:
if (log_append && (log_path != null)) { // assuming directory exists
String svd_title=SingularValueDecomposition.titleString(use_degrees);
StringBuffer sb = new StringBuffer();
sb.append(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(Calendar.getInstance().getTime())+"\n");
sb.append("number of scenes pairs\t"+ available_pairs.length+"\n");
sb.append(String.format("%4s\t%4s\t%17s\t%17s\t%6s\t%3s\t%6s\t%6s\t%7s\n",
"scn1","scn2","timestamp1","timestamp2","ovrlp","zl","RMS-sp","RMSfin","fzl","removed"));
sb.append(String.format("%4s\t%4s\t%17s\t%17s\t%6s\t%3s\t%6s\t%6s\t%7s\t%7s\t%s\n",
"scn1","scn2","timestamp1","timestamp2","ovrlp","zl","RMS-sp","RMSfin","fzl","removed",svd_title));
CalibrationFileManagement.saveStringToFile (
log_path, //String path,
sb.toString(), // data,
......@@ -5897,7 +5911,9 @@ public class OrthoMapsCollection implements Serializable{
if (debugLevel > -4) System.out.print("Final adjustment (3)"+str_failed);
} else {
pairwiseOrthoMatch.overlap = overlap_frac; // needed here if refining old/manual w/o overlap
sb.append(String.format("\t%6.4f\t%3d\n",pairwiseOrthoMatch.rms,pairwiseOrthoMatch.zoom_lev));
SingularValueDecomposition svd = SingularValueDecomposition.singularValueDecompose(pairwiseOrthoMatch.getAffine());
String ssvd = svd.toString(use_degrees, 1);
sb.append(String.format("\t%6.4f\t%3d\t \t%s\n",pairwiseOrthoMatch.rms,pairwiseOrthoMatch.zoom_lev, ssvd));
if (debugLevel > -4) System.out.println("Final adjustment (4) RMSE="+pairwiseOrthoMatch.rms+
", overlap = "+pairwiseOrthoMatch.overlap);
ortho_maps[ipair[0]].setMatch(ortho_maps[ipair[1]].getName(),pairwiseOrthoMatch);
......@@ -5926,6 +5942,7 @@ public class OrthoMapsCollection implements Serializable{
} // for (int npair = 0; npair < available_pairs.length; npair++) {
if (log_append && (log_path != null)) { // assuming directory exists
StringBuffer sb = new StringBuffer();
sb.append(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(Calendar.getInstance().getTime())+"\n");
sb.append("\nSUMMARY\n");
sb.append("new\t"+ num_pairs+"\n");
// sb.append("new\t"+ new_pairs.size()+"\n");
......
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