Commit b8b1f945 authored by Andrey Filippov's avatar Andrey Filippov

Debugging OrthoMultiLMA

parent 352aa9e1
...@@ -157,13 +157,14 @@ public class ComboMatch { ...@@ -157,13 +157,14 @@ public class ComboMatch {
// boolean show_map_stats = false; // boolean show_map_stats = false;
boolean show_combo = false; // true; boolean show_combo = false; // true;
boolean create_overlaps = false; boolean create_overlaps = false;
boolean create_map = false;
// boolean show_combo_mask = false; // generate image mas (where it is defined)_ // boolean show_combo_mask = false; // generate image mas (where it is defined)_
// boolean use_alt = false; // boolean use_alt = false;
// boolean show_centers = true; // boolean show_centers = true;
boolean use_saved_collection = true; // false; boolean use_saved_collection = true; // false;
boolean save_collection = true; boolean save_collection = true;
boolean process_correlation = true; // use false to save new version of data boolean process_correlation = true; // use false to save new version of data
int num_tries_fit = 10; int num_tries_fit = 10;
boolean update_match = true; // use false to save new version of data boolean update_match = true; // use false to save new version of data
boolean render_match = false; // true; boolean render_match = false; // true;
boolean test_multi_lma = false; boolean test_multi_lma = false;
...@@ -231,6 +232,7 @@ public class ComboMatch { ...@@ -231,6 +232,7 @@ public class ComboMatch {
// gd.addCheckbox ("Show statistics for ortho images", show_map_stats, "Generate and show statistics for ortho maps."); // gd.addCheckbox ("Show statistics for ortho images", show_map_stats, "Generate and show statistics for ortho maps.");
gd.addCheckbox ("Show combo maps/stats", show_combo, "Generate/save combo maps and stats."); gd.addCheckbox ("Show combo maps/stats", show_combo, "Generate/save combo maps and stats.");
gd.addCheckbox ("Create overlap pairs", create_overlaps, "Create scene pairs overlaps."); gd.addCheckbox ("Create overlap pairs", create_overlaps, "Create scene pairs overlaps.");
gd.addCheckbox ("Create map", create_map, "Create combined map from pairwise matches.");
// gd.addCheckbox ("Show combo image mask", show_combo_mask, "Display combo binary image."); // 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.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."); gd.addNumericField("Remove fraction of worst matches", frac_remove, 3,7,"", "When fitting scenes remove this fraction of worst match.");
...@@ -286,6 +288,7 @@ public class ComboMatch { ...@@ -286,6 +288,7 @@ public class ComboMatch {
show_combo = gd.getNextBoolean(); show_combo = gd.getNextBoolean();
create_overlaps = gd.getNextBoolean(); create_overlaps = gd.getNextBoolean();
create_map = gd.getNextBoolean();
frac_remove = gd.getNextNumber(); frac_remove = gd.getNextNumber();
metric_error= gd.getNextNumber(); metric_error= gd.getNextNumber();
if (use_marked_image ) { // will only be used if found and asked if (use_marked_image ) { // will only be used if found and asked
...@@ -768,7 +771,14 @@ public class ComboMatch { ...@@ -768,7 +771,14 @@ public class ComboMatch {
} // final int debugLevel); } // final int debugLevel);
} }
if (create_map) {
OrthoMultiLMA.buildOrthoMap(
clt_parameters, // CLTParameters clt_parameters,
maps_collection, // OrthoMapsCollection maps_collection
orthoMapsCollection_path); // String orthoMapsCollection_path
return true;
}
if (create_overlaps) { if (create_overlaps) {
boolean ok =maps_collection.getIntersectedPairs( boolean ok =maps_collection.getIntersectedPairs(
clt_parameters, // CLTParameters clt_parameters, clt_parameters, // CLTParameters clt_parameters,
......
...@@ -720,7 +720,7 @@ public class OrthoPairLMA { ...@@ -720,7 +720,7 @@ public class OrthoPairLMA {
} }
private double [][] getWJtJlambda( // USED in lwir private double [][] getWJtJlambda(
final double lambda, final double lambda,
final double [][] jt) final double [][] jt)
{ {
...@@ -766,7 +766,6 @@ public class OrthoPairLMA { ...@@ -766,7 +766,6 @@ public class OrthoPairLMA {
final double [][] jt, // should be null or initialized with [vector.length][] final double [][] jt, // should be null or initialized with [vector.length][]
final int debug_level) final int debug_level)
{ {
// final double [][] affine = {{vector[0],vector[1],vector[4]},{vector[2],vector[3],vector[5]}};
final double [] fx = new double [weights.length]; // weights.length]; : weights.length : final double [] fx = new double [weights.length]; // weights.length]; : weights.length :
if (jt != null) { if (jt != null) {
for (int i = 0; i < jt.length; i++) { for (int i = 0; i < jt.length; i++) {
......
...@@ -2583,7 +2583,7 @@ public class Corr2dLMA { ...@@ -2583,7 +2583,7 @@ public class Corr2dLMA {
fx[i] = this.weights[i] * d; fx[i] = this.weights[i] * d;
rms += fx[i]*d; // sum of weights rms += fx[i]*d; // sum of weights
} }
rms_pure = Math.sqrt(rms)/this.pure_weight; rms_pure = Math.sqrt(rms)/this.pure_weight; // Not Math.sqrt(rms/this.pure_weight)?
for (int i = num_samples; i < num_points; i++) { for (int i = num_samples; i < num_points; i++) {
double d = (values[i] - fx[i]); double d = (values[i] - fx[i]);
fx[i] = this.weights[i] * d; fx[i] = this.weights[i] * d;
......
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