Commit 7ad0875e authored by Andrey Filippov's avatar Andrey Filippov

Matching altitudes

parent 1cc6d251
...@@ -114,6 +114,7 @@ public class DoubleGaussianBlur { ...@@ -114,6 +114,7 @@ public class DoubleGaussianBlur {
* @param extraLines Number of lines (parallel to the blurring direction) * @param extraLines Number of lines (parallel to the blurring direction)
* below and above the roi bounds that should be processed. * below and above the roi bounds that should be processed.
*/ */
// TODO: Make threaded!
public void blur1Direction(double [] pixels, public void blur1Direction(double [] pixels,
int width, int width,
int height, int height,
......
...@@ -39,6 +39,7 @@ import com.elphel.imagej.cameras.CLTParameters; ...@@ -39,6 +39,7 @@ import com.elphel.imagej.cameras.CLTParameters;
import com.elphel.imagej.common.GenericJTabbedDialog; import com.elphel.imagej.common.GenericJTabbedDialog;
import com.elphel.imagej.common.ShowDoubleFloatArrays; import com.elphel.imagej.common.ShowDoubleFloatArrays;
import com.elphel.imagej.tileprocessor.ImageDtt; import com.elphel.imagej.tileprocessor.ImageDtt;
import com.elphel.imagej.tileprocessor.IntersceneMatchParameters;
import Jama.Matrix; import Jama.Matrix;
import ij.ImagePlus; import ij.ImagePlus;
...@@ -265,10 +266,14 @@ public class OrthoMultiLMA { ...@@ -265,10 +266,14 @@ public class OrthoMultiLMA {
boolean flt_filt_zoom = clt_parameters.imp.flt_filt_zoom; // true; boolean flt_filt_zoom = clt_parameters.imp.flt_filt_zoom; // true;
int flt_min_zoom = clt_parameters.imp.flt_min_zoom; // -2; int flt_min_zoom = clt_parameters.imp.flt_min_zoom; // -2;
int flt_max_zoom = clt_parameters.imp.flt_max_zoom; // 10; 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;
boolean flt_show_names = true; // clt_parameters.imp.flt_show_names; // true; 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_overlaps = true; // clt_parameters.imp.flt_show_overlaps; // true;
boolean flt_show_rms = true; // clt_parameters.imp.flt_show_rms; // true; boolean flt_show_rms = true; // clt_parameters.imp.flt_show_rms; // true;
boolean flt_show_zoom = true; // clt_parameters.imp.flt_show_zoom; // true; boolean flt_show_zoom = true; // clt_parameters.imp.flt_show_zoom; // true;
boolean flt_show_alt = true; // clt_parameters.imp.flt_show_alt; // true;
boolean move_only = clt_parameters.imp.pmap_move_only; // false; boolean move_only = clt_parameters.imp.pmap_move_only; // false;
boolean ignore_affines = clt_parameters.imp.pmap_ignore_affines; // false; boolean ignore_affines = clt_parameters.imp.pmap_ignore_affines; // false;
...@@ -298,7 +303,9 @@ public class OrthoMultiLMA { ...@@ -298,7 +303,9 @@ public class OrthoMultiLMA {
gd.addCheckbox ("Filter by zoom level" , flt_filt_zoom, "Filter by the zoom level used for matching."); gd.addCheckbox ("Filter by zoom level" , flt_filt_zoom, "Filter by the zoom level used for matching.");
gd.addNumericField("Minimal zoom", flt_min_zoom, 0,3,"","Minimal zoom level used for matching."); gd.addNumericField("Minimal zoom", flt_min_zoom, 0,3,"","Minimal zoom level used for matching.");
gd.addNumericField("Maximal zoom", flt_max_zoom, 0,3,"","Maximal zoom level used for matching."); gd.addNumericField("Maximal zoom", flt_max_zoom, 0,3,"","Maximal zoom level used for matching.");
gd.addNumericField("Minimal SfM gain", flt_min_sfm, 3,7,"","Minimal SfM gain of the minimum in the scene pair.");
gd.addNumericField("Maximal SfM gain", flt_max_sfm, 3,7,"","Maximal SfM gain of the minimum in the scene pair.");
gd.addChoice("Filter by pairwise ALT availability",IntersceneMatchParameters.FLT_ALT_MODES, IntersceneMatchParameters.FLT_ALT_MODES[flt_alt],"Filter by pairwise ALT availability.");
gd.addCheckbox ("Moves only", move_only, "Moves only, no affine transform."); gd.addCheckbox ("Moves only", move_only, "Moves only, no affine transform.");
gd.addCheckbox ("Ignore existing affines", ignore_affines, "Start from unity matrices, ignore saved affines."); gd.addCheckbox ("Ignore existing affines", ignore_affines, "Start from unity matrices, ignore saved affines.");
gd.addCheckbox ("Use reversed pairs", use_inv, "Use reversed (late-early timestamps) pairs."); gd.addCheckbox ("Use reversed pairs", use_inv, "Use reversed (late-early timestamps) pairs.");
...@@ -328,8 +335,10 @@ public class OrthoMultiLMA { ...@@ -328,8 +335,10 @@ public class OrthoMultiLMA {
/// flt_nan_rms = gd.getNextBoolean(); /// flt_nan_rms = gd.getNextBoolean();
flt_filt_zoom = gd.getNextBoolean(); flt_filt_zoom = gd.getNextBoolean();
flt_min_zoom = (int) gd.getNextNumber(); flt_min_zoom = (int) gd.getNextNumber();
flt_max_zoom = (int) gd.getNextNumber(); flt_max_zoom = (int) gd.getNextNumber();
flt_min_sfm = gd.getNextNumber();
flt_max_sfm = gd.getNextNumber();
flt_alt = gd.getNextChoiceIndex();
move_only = gd.getNextBoolean(); move_only = gd.getNextBoolean();
ignore_affines = gd.getNextBoolean(); ignore_affines = gd.getNextBoolean();
use_inv = gd.getNextBoolean(); use_inv = gd.getNextBoolean();
...@@ -354,6 +363,9 @@ public class OrthoMultiLMA { ...@@ -354,6 +363,9 @@ public class OrthoMultiLMA {
clt_parameters.imp.flt_filt_zoom = flt_filt_zoom; clt_parameters.imp.flt_filt_zoom = flt_filt_zoom;
clt_parameters.imp.flt_min_zoom = flt_min_zoom; clt_parameters.imp.flt_min_zoom = flt_min_zoom;
clt_parameters.imp.flt_max_zoom = flt_max_zoom; clt_parameters.imp.flt_max_zoom = flt_max_zoom;
clt_parameters.imp.flt_min_sfm = flt_min_sfm;
clt_parameters.imp.flt_max_sfm = flt_max_sfm;
clt_parameters.imp.flt_alt = flt_alt;
clt_parameters.imp.pmap_move_only = move_only; clt_parameters.imp.pmap_move_only = move_only;
clt_parameters.imp.pmap_ignore_affines = ignore_affines; clt_parameters.imp.pmap_ignore_affines = ignore_affines;
clt_parameters.imp.pmap_use_inv = use_inv; clt_parameters.imp.pmap_use_inv = use_inv;
...@@ -376,9 +388,12 @@ public class OrthoMultiLMA { ...@@ -376,9 +388,12 @@ public class OrthoMultiLMA {
flt_min_rms, // double min_rms, flt_min_rms, // double min_rms,
flt_max_rms, // double max_rms, flt_max_rms, // double max_rms,
flt_nan_rms, // boolean nan_rms) flt_nan_rms, // boolean nan_rms)
flt_filt_zoom, // boolean filt_zoom, flt_filt_zoom, // boolean filt_zoom,
flt_min_zoom, // int min_zoom, flt_min_zoom, // int min_zoom,
flt_max_zoom); // int max_zoom) flt_max_zoom, // int max_zoom)
flt_min_sfm, // double min_sfm,
flt_max_sfm, // double max_sfm,
flt_alt); // int flt_alt)
String [] choices_all = maps_collection.textPairs ( String [] choices_all = maps_collection.textPairs (
available_pairs, // int [][] plist, available_pairs, // int [][] plist,
...@@ -386,6 +401,8 @@ public class OrthoMultiLMA { ...@@ -386,6 +401,8 @@ public class OrthoMultiLMA {
flt_show_overlaps, // boolean show_overlap, flt_show_overlaps, // boolean show_overlap,
flt_show_rms, // boolean show_rms, flt_show_rms, // boolean show_rms,
flt_show_zoom, // boolean show_zoom, flt_show_zoom, // boolean show_zoom,
flt_show_alt, // boolean show_alt,
true, // boolean use_tab,
null); // String extra_line) null); // String extra_line)
if (debugLevel > 0) { if (debugLevel > 0) {
System.out.println("Selected "+available_pairs.length+" scene pairs for matching"); System.out.println("Selected "+available_pairs.length+" scene pairs for matching");
......
/**
** PairwiseOrthoMatch - Represent pairwise match between scenes
**
** Copyright (C) 2024 Elphel, Inc.
**
** -----------------------------------------------------------------------------**
**
** PairwiseOrthoMatch.java is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
** -----------------------------------------------------------------------------**
**
*/
package com.elphel.imagej.orthomosaic; package com.elphel.imagej.orthomosaic;
import java.io.IOException; import java.io.IOException;
...@@ -29,6 +52,14 @@ public class PairwiseOrthoMatch implements Serializable { ...@@ -29,6 +52,14 @@ public class PairwiseOrthoMatch implements Serializable {
this.overlap =overlap; this.overlap =overlap;
} }
public double [] getAltData() {
return alt_data;
}
public void setAltData(double [] data) {
alt_data = data;
}
public PairwiseOrthoMatch( public PairwiseOrthoMatch(
double [][] affine, double [][] affine,
double [][] jtj, double [][] jtj,
...@@ -80,6 +111,7 @@ public class PairwiseOrthoMatch implements Serializable { ...@@ -80,6 +111,7 @@ public class PairwiseOrthoMatch implements Serializable {
} }
pom.equalize1to0 = this.equalize1to0.clone(); pom.equalize1to0 = this.equalize1to0.clone();
pom.ok = this.ok; pom.ok = this.ok;
pom.alt_data = this.alt_data.clone();
return pom; return pom;
} }
/** /**
......
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