Commit 75c570c2 authored by Andrey Filippov's avatar Andrey Filippov
Browse files

Tested LMA equalization, some bug fixes

parent f7f4a8dd
Loading
Loading
Loading
Loading
+18 −5
Original line number Diff line number Diff line
@@ -159,6 +159,8 @@ public class ComboMatch {
		boolean create_overlaps =     false;
		boolean equalize_overlaps =   false;
		boolean create_map =          false;
		boolean create_equalize =     false;
		
//		boolean show_combo_mask =     false; // generate image mas (where it is defined)_
//		boolean use_alt =             false;
//		boolean show_centers =        true;
@@ -194,7 +196,7 @@ public class ComboMatch {
		}
		
		
		GenericJTabbedDialog gd = new GenericJTabbedDialog("Set image pair",1200,700);
		GenericJTabbedDialog gd = new GenericJTabbedDialog("Set image pair",1200,800);
		gd.addChoice      ("Files list/data path (w/o extension):", files_lists_paths, files_lists_paths[default_list_choice]);
		gd.addCheckbox    ("Use saved maps collection", use_saved_collection, "If false - use files list.");
		gd.addCheckbox    ("Save maps collection", save_collection, "Save maps collection to be able to restore.");
@@ -235,6 +237,7 @@ public class ComboMatch {
		gd.addCheckbox    ("Create overlap pairs",             create_overlaps, "Create scene pairs overlaps.");
		gd.addCheckbox    ("Equalize overlap pairs",           equalize_overlaps, "Equalize intensities in overlaps.");
		gd.addCheckbox    ("Create map",                       create_map, "Create combined map from pairwise matches.");
		gd.addCheckbox    ("Equalize intensities",             create_equalize, "Create map intensities equalization from pairwise matches.");
//		gd.addCheckbox    ("Show combo image mask",            show_combo_mask, "Display combo binary image.");
//		gd.addCheckbox    ("Show altitude combo image", use_alt, "Load and process altitude maps.");
		gd.addNumericField("Remove fraction of worst matches",   frac_remove,  3,7,"",	"When fitting scenes remove this fraction of worst match.");
@@ -263,6 +266,7 @@ public class ComboMatch {
		String orthoMapsCollection_path =files_lists_paths[choice_index]+".data";
		use_saved_collection =     gd.getNextBoolean();
		save_collection =          gd.getNextBoolean();
		String orthoMapsCollection_savepath = save_collection?orthoMapsCollection_path:null;
		process_correlation=       gd.getNextBoolean();
		num_tries_fit =      (int) gd.getNextNumber();
		update_match=              gd.getNextBoolean();
@@ -292,6 +296,7 @@ public class ComboMatch {
		create_overlaps =           gd.getNextBoolean();
		equalize_overlaps =         gd.getNextBoolean();
		create_map =                gd.getNextBoolean();
		create_equalize =           gd.getNextBoolean();
		frac_remove =               gd.getNextNumber();
		metric_error=               gd.getNextNumber();
		if (use_marked_image ) { // will only be used if found and asked
@@ -778,20 +783,28 @@ public class ComboMatch {
			OrthoMultiLMA.buildOrthoMap(
					clt_parameters,            // CLTParameters       clt_parameters,
					maps_collection, // OrthoMapsCollection maps_collection
					orthoMapsCollection_path); // String orthoMapsCollection_path
					orthoMapsCollection_savepath); // String orthoMapsCollection_path
			return true;
		}

		if (create_equalize) {
			OrthoEqualizeLMA.buildEqualize(
					clt_parameters,            // CLTParameters       clt_parameters,
					maps_collection, // OrthoMapsCollection maps_collection
					orthoMapsCollection_savepath); // String orthoMapsCollection_path
			return true;
		}
		
		if (create_overlaps) {
			boolean ok =maps_collection.getIntersectedPairs(
					clt_parameters, // CLTParameters    clt_parameters,
					orthoMapsCollection_path); // String orthoMapsCollection_path);
					orthoMapsCollection_savepath); // String orthoMapsCollection_path);
			return ok; // Just exit, do not try other commands.  if (!ok) return false;
		}
		if (equalize_overlaps) {
			boolean ok =maps_collection.equalizeIntersectedPairs(
					clt_parameters, // CLTParameters    clt_parameters,
					orthoMapsCollection_path); // String orthoMapsCollection_path);
					orthoMapsCollection_savepath); // String orthoMapsCollection_path);
			return ok; // Just exit, do not try other commands.  if (!ok) return false;
		}
		
Loading