Commit b8b1f945 authored by Andrey Filippov's avatar Andrey Filippov

Debugging OrthoMultiLMA

parent 352aa9e1
...@@ -157,6 +157,7 @@ public class ComboMatch { ...@@ -157,6 +157,7 @@ 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;
...@@ -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,6 +771,13 @@ public class ComboMatch { ...@@ -768,6 +771,13 @@ 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(
......
...@@ -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