gd.addCheckbox("Use existing image pair",use_existing_pair,"Use existing affine settings for this pair, do not use spiral search.");
}else{
...
...
@@ -1072,8 +1121,20 @@ public class ComboMatch {
gd.addNumericField("Minimal overlap",min_overlap,0,4,"scaled pix ^ 2","Minimal overlap area in square scaled pixels.");
gd.addNumericField("LMA iterations",num_iter_lma,0,2,"","Number of LMA iterations.");
gd.addCheckbox("Ignore worsening RMSE",ignore_rms,"Ignore worsening/not improving RMSE during spiral search.");
gd.addCheckbox("Write log file",log_append,"Enable writing log file with matching results.");
gd.addStringField("Log file full path",log_path,150,"Path of the log file to be appended.");
gd.addNumericField("Spiral search debug level",spiral_debug,0,3,"","Debug level during Spiral search.");
gd.addMessage("Parameters, common to all matching, not only spiral");
gd.addNumericField("Central area standard deviation",max_std,3,7,"","Central area limit by the standard deviation.");
gd.addNumericField("Central area minimal radius",min_std_rad,3,7,"tile","Minimal radius of the central area after all LMA passes.");
gd.addNumericField("Central area radius as fraction",rad_fraction,3,7,"","Central area radius as fraction of half minimal WOI dimension.");
gd.addNumericField("Maximal central area radius",max_tile_rad,3,7,"tiles","Absolute limit to the center area radius (eases bad peripheral matching).");
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.showDialog();
if(gd.wasCanceled())returnnull;
if(pairwiseOrthoMatch!=null){
...
...
@@ -1089,7 +1150,18 @@ public class ComboMatch {
min_overlap=(int)gd.getNextNumber();
num_iter_lma=(int)gd.getNextNumber();
ignore_rms=gd.getNextBoolean();
log_append=gd.getNextBoolean();
log_path=gd.getNextString();
spiral_debug=(int)gd.getNextNumber();
search_step=gd.getNextNumber();
max_std=gd.getNextNumber();
min_std_rad=gd.getNextNumber();
rad_fraction=gd.getNextNumber();
max_tile_rad=gd.getNextNumber();
fill_fraction=gd.getNextNumber();
fill_fraction_final=gd.getNextNumber();
ease_nosfm=gd.getNextNumber();
if(use_existing_pair){
if(invert_exixting_pair){
System.out.println("Both direct and inverted matches are selected, using direct match");
...
...
@@ -1104,11 +1176,17 @@ public class ComboMatch {
double[][]affine0={{1,0,0},{0,1,0}};// will always stay the same
double[][]affine1={{1,0,0},{0,1,0}};// here (manual mode) start from the center, may use prediction in auto
doublerad_fraction=clt_parameters.imp.pmtch_cent_rad;// center circle radius fraction of 0.5* min(width, height) in tiles
doublemax_tile_rad=clt_parameters.imp.pmtch_max_cent_rad;// maximal center radius in tiles (limit pmtch_cent_rad)
doublefill_fraction=clt_parameters.imp.pmtch_cent_fill;// should be populated not less than this
doublefill_fraction_final=clt_parameters.imp.pmtch_cent_final;// should be populated not less than this during final pass
doubleease_nosfm=clt_parameters.imp.pmtch_ease_nosfm;// ease metric_error when no SfM gain == 0;
GenericJTabbedDialoggd=newGenericJTabbedDialog("Pairwise Match Parameters",1200,1000);
gd.addMessage("Number of scenes - "+num_scenes+
", number of pairs (w/o inverse) - "+num_pairs+
", number of new pairs - "+num_new);
gd.addCheckbox("Skip existing",skip_exist,"Do not regenerate if match with same or higher resolution exists.");
gd.addCheckbox("Refine existing",refine_exist,"Refine existing matches (false - start from scratch with spiral search).");
gd.addCheckbox("Delete failed",delete_failed,"Delete previous matches if it failed now.");
gd.addCheckbox("Generate inverse matches",gen_inverse,"Generate (refine if exist and enabled) inverse matches.");
gd.addCheckbox("Save state after each match",save_each,"Update state file after each match generation to mitigate possible crashes.");
gd.addCheckbox("Write log file",log_append,"Enable writing log file with matching results.");
gd.addStringField("Log file full path",log_path,150,"Path of the log file to be appended.");
gd.addNumericField("Pairwise match debug level",debugLevel,0,3,"","Debug level during Spiral search.");
gd.addMessage("Initial spiral search for image matching");
gd.addNumericField("Spiral search step",search_step,3,7,"scaled pix","Distance between spiral search probes, in scaled pixels.");
gd.addNumericField("Spiral search radius",search_range,3,7,"scaled pix","Maximal radius of the spiral search, in scaled pixels.");
gd.addNumericField("Mitigate small overlap",double_threshold,3,7,"","For small overlaps increase zoom by 1 and range - twice.");
gd.addNumericField("RMSE to end search",good_rms,3,7,"scaled pix","Maximal RMSE to consider match, in scaled pixels.");
gd.addNumericField("Satisfactory RMSE",max_rms,3,7,"scaled pix","Maximal RMSE to consider match, in scaled pixels.");
gd.addNumericField("Minimal overlap",min_overlap,0,4,"scaled pix ^ 2","Minimal overlap area in square scaled pixels.");
gd.addNumericField("LMA iterations",num_iter_lma,0,2,"","Number of LMA iterations during spiral search.");
gd.addNumericField("RMSE at first iteration",max_rms_iter[0],3,7,"scaled pix","Maximal RMSE at first iteration.");
gd.addNumericField("RMSE at second iteration",max_rms_iter[1],3,7,"scaled pix","Maximal RMSE at second iteration.");
gd.addCheckbox("Ignore worsening RMSE",spiral_ignore_rms,"Ignore worsening/not improving RMSE during spiral search.");
gd.addNumericField("Spiral search debug level",spiral_debug,0,3,"","Debug level during Spiral search.");
gd.addMessage("Final pairwise scenes matching");
gd.addNumericField("Remove fraction of worst matches",frac_remove,3,7,"","When fitting scenes remove this fraction of worst match tiles.");
gd.addNumericField("Maximal metric error",metric_err,3,7,"m","Maximal tolerable fitting error caused by elevation variations.");
gd.addNumericField("Central area standard deviation",max_std,3,7,"","Central area limit by the standard deviation.");
gd.addNumericField("Central area minimal radius",min_std_rad,3,7,"tile","Minimal radius of the central area after all LMA passes.");
gd.addCheckbox("Ignore previous RMSE",ignore_prev_rms,"Do not exit full fitting cycles if the RMSE worsened/not improved.");
gd.addNumericField("Number of fitting iterations",num_tries,0,3,"","number of full fittng iterations.");
gd.addNumericField("Central area radius as fraction",rad_fraction,3,7,"","Central area radius as fraction of half minimal WOI dimension.");
gd.addNumericField("Maximal central area radius",max_tile_rad,3,7,"tiles","Absolute limit to the center area radius (eases bad peripheral matching).");
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.showDialog();
if(gd.wasCanceled())returnfalse;
skip_exist=gd.getNextBoolean();
refine_exist=gd.getNextBoolean();
delete_failed=gd.getNextBoolean();
gen_inverse=gd.getNextBoolean();
save_each=gd.getNextBoolean();
log_append=gd.getNextBoolean();
log_path=gd.getNextString();
debugLevel=(int)gd.getNextNumber();
search_step=gd.getNextNumber();
search_range=gd.getNextNumber();
double_threshold=gd.getNextNumber();
good_rms=gd.getNextNumber();
max_rms=gd.getNextNumber();
min_overlap=(int)gd.getNextNumber();
num_iter_lma=(int)gd.getNextNumber();
max_rms_iter[0]=gd.getNextNumber();
max_rms_iter[1]=gd.getNextNumber();
spiral_ignore_rms=gd.getNextBoolean();
spiral_debug=(int)gd.getNextNumber();
frac_remove=gd.getNextNumber();
metric_err=gd.getNextNumber();
max_std=gd.getNextNumber();
min_std_rad=gd.getNextNumber();
ignore_prev_rms=gd.getNextBoolean();
num_tries=(int)gd.getNextNumber();
rad_fraction=gd.getNextNumber();
max_tile_rad=gd.getNextNumber();
fill_fraction=gd.getNextNumber();
fill_fraction_final=gd.getNextNumber();
ease_nosfm=gd.getNextNumber();
returngeneratePairwiseMatches(
clt_parameters,// CLTParameters clt_parameters,
min_overlap_frac,// double min_overlap_frac,
indices,// int [] indices,
overlaps,// double [] overlaps,
skip_exist,// boolean skip_existing,
refine_exist,// boolean refine_existing, // if false, start from scratch, true - start from previous
delete_failed,// boolean delete_failed, // if false, start from scratch, true - start from previous
"Minimal neighbors phase correlation maximums relative to maximal strength.");
gd.addMessage("Initial spiral search for image matching");
gd.addMessage("Pairwise scenes matching");
gd.addNumericField("Remove fraction of worst matches",this.pmtch_frac_remove,3,7,"","When fitting scenes remove this fraction of worst match tiles.");
gd.addNumericField("Maximal metric error",this.pmtch_metric_err,3,7,"m","Maximal tolerable fitting error caused by elevation variations.");
gd.addNumericField("Central area standard deviation",this.pmtch_max_std,3,7,"","Central area limit by the standard deviation.");
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("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.");
gd.addNumericField("Central area minimal fill final",this.pmtch_cent_final,3,7,"","Central area minimal fill for the last iteration.");
gd.addNumericField("Relax metric error for no-SfM",this.pmtch_ease_nosfm,3,7,"","Relax metric error for no-SfM scenes (sfm_gain==0).");
gd.addMessage("Initial spiral search for image matching");
gd.addCheckbox("Use existing image pair",this.ospir_existing,"Use existing affine settings for this pair, do not use spiral search.");
gd.addCheckbox("Invert existing image pair",this.ospir_invert,"Invert existing image pair affine transform, do not use spiral search.");
gd.addNumericField("Spiral search step",this.ospir_step,3,7,"scaled pix","Distance between spiral search probes, in scaled pixels.");
gd.addNumericField("Spiral search radius",this.ospir_range,3,7,"scaled pix","Maximal radius of the spiral search, in scaled pixels.");
gd.addNumericField("Mitigate small overlap",this.ospir_double,3,7,"","For small overlaps increase zoom by 1 and range - twice.");
gd.addNumericField("RMSE to end search",this.ospir_good_rms,3,7,"scaled pix","Maximal RMSE to consider match, in scaled pixels.");
gd.addNumericField("Satisfactory RMSE",this.ospir_max_rms,3,7,"scaled pix","Maximal RMSE to consider match, in scaled pixels.");
gd.addNumericField("Minimal overlap",this.ospir_overlap,0,4,"scaled pix ^ 2","Minimal overlap area in square scaled pixels.");
gd.addNumericField("LMA iterations",this.ospir_num_iter,0,2,"","Number of LMA iterations during spiral search.");
gd.addNumericField("RMSE at first iteration",this.ospir_rms_iter[0],3,7,"scaled pix","Maximal RMSE at first iteration.");
gd.addNumericField("RMSE at second iteration",this.ospir_rms_iter[1],3,7,"scaled pix","Maximal RMSE at second iteration.");
gd.addCheckbox("Ignore worsening RMSE",this.ospir_ignore_rms,"Ignore worsening/not improving RMSE during spiral search.");
gd.addNumericField("Spiral search debug level",this.ospir_debug,0,3,"","Debug level during Spiral search.");
gd.addMessage("Pairwise image matching");
gd.addNumericField("Zoom level",this.pwise_zoom,0,3,"","Low-res images to determine overlaps.");
gd.addNumericField("Minimal overlap fraction",this.pwise_overlap,3,7,"","Minimal overlap area as a fraction of the smaller of the two images.");
gd.addCheckbox("Skip existing",this.pwise_skip_exist,"Do not regenerate if match with same or higher resolution exists.");
gd.addCheckbox("Refine existing",this.pwise_refine_exist,"Refine existing matches (false - start from scratch with spiral search).");
gd.addCheckbox("Delete failed",this.pwise_delete_fail,"Delete previous matches if it failed now.");
gd.addCheckbox("Generate inverse matches",this.pwise_gen_inverse,"Generate (refine if exist and enabled) inverse matches.");
gd.addCheckbox("Save state after each match",this.pwise_save_each,"Update state file after each match generation to mitigate possible crashes.");
gd.addCheckbox("Write log file",this.pwise_log_append,"Enable writing log file with matching results.");
gd.addStringField("Log file full path",this.pwise_log_path,150,"Path of the log file to be appended.");
gd.addNumericField("Pairwise match debug level",this.pwise_debug,0,3,"","Debug level during Spiral search.");
//
gd.addTab("Scene Series","Processing series of scenes and multi-series sets");
gd.addMessage("Build series options");
...
...
@@ -1563,17 +1622,43 @@ public class IntersceneMatchParameters {
this.rln_sngl_rstr=gd.getNextNumber();
this.rln_neib_rstr=gd.getNextNumber();
this.pmtch_frac_remove=gd.getNextNumber();
this.pmtch_metric_err=gd.getNextNumber();
this.pmtch_max_std=gd.getNextNumber();
this.pmtch_min_std_rad=gd.getNextNumber();
this.pmtch_ignore_rms=gd.getNextBoolean();
this.pmtch_num_iter=(int)gd.getNextNumber();
this.pmtch_cent_rad=gd.getNextNumber();
this.pmtch_max_cent_rad=gd.getNextNumber();
this.pmtch_cent_fill=gd.getNextNumber();
this.pmtch_cent_final=gd.getNextNumber();
this.pmtch_ease_nosfm=gd.getNextNumber();
this.ospir_existing=gd.getNextBoolean();
this.ospir_invert=gd.getNextBoolean();
this.ospir_step=gd.getNextNumber();
this.ospir_range=gd.getNextNumber();
this.ospir_double=gd.getNextNumber();
this.ospir_good_rms=gd.getNextNumber();
this.ospir_max_rms=gd.getNextNumber();
this.ospir_overlap=(int)gd.getNextNumber();
this.ospir_num_iter=(int)gd.getNextNumber();
this.ospir_rms_iter[0]=gd.getNextNumber();
this.ospir_rms_iter[1]=gd.getNextNumber();
this.ospir_ignore_rms=gd.getNextBoolean();
this.ospir_debug=(int)gd.getNextNumber();
this.pwise_zoom=(int)gd.getNextNumber();
this.pwise_overlap=gd.getNextNumber();
this.pwise_skip_exist=gd.getNextBoolean();
this.pwise_refine_exist=gd.getNextBoolean();
this.pwise_delete_fail=gd.getNextBoolean();
this.pwise_gen_inverse=gd.getNextBoolean();
this.pwise_save_each=gd.getNextBoolean();
this.pwise_log_append=gd.getNextBoolean();
this.pwise_log_path=gd.getNextString();
this.pwise_debug=(int)gd.getNextNumber();
this.center_reference=gd.getNextBoolean();
this.overlap_sequences=gd.getNextBoolean();
this.reset_photometric=gd.getNextBoolean();
...
...
@@ -2033,19 +2118,46 @@ public class IntersceneMatchParameters {