Commit 5d8a3045 authored by Andrey Filippov's avatar Andrey Filippov

cleaning up radar mode, fixed detection code

parent 61af6427
......@@ -876,7 +876,8 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
jpanelLWIRWorld = new JPanel();
jpanelLWIRWorld.setLayout(new GridLayout(1, 0, 5, 5)); // rows, columns, vgap, hgap
addJButton("Aux Build Series", jpanelLWIRWorld, color_stop);
addJButton("CUAS Combine", jpanelLWIRWorld, color_stop);
addJButton("CUAS Combine", jpanelLWIRWorld, color_stop, "Combine previously processed CUAS series");
addJButton("CUAS Video", jpanelLWIRWorld, color_stop, "Combine previously rendered CUAS videos");
addJButton("Build World", jpanelLWIRWorld, color_process);
addJButton("Test IMX5", jpanelLWIRWorld, color_process);
addJButton("Show mice", jpanelLWIRWorld, color_process);
......@@ -1483,16 +1484,26 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
panel.add(b);
}
void addJButton(String label, JPanel panel, Color color) {
void addJButton(String label, JPanel panel, Color color, String tooltip) {
JButton b = new JButton(label);
if (color != null) {
b.setBackground(color);
}
b.addActionListener(this);
b.addKeyListener(IJ.getInstance());
b.setToolTipText(label);
b.setToolTipText(tooltip);
panel.add(b);
}
void addJButton(String label, JPanel panel, Color color) {
addJButton(
label, // String label,
panel, // JPanel panel,
color, // Color color,
label); // String tooltip);
}
@Override
......@@ -5703,7 +5714,16 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
true,
1); // int cuas_proc_mode); // 0 - old, 1 combine scene series) {);
return;
//"CUAS Combine"
//"CUAS Combine" "CUAS Video"
/* ======================================================================== */
} else if (label.equals("CUAS Video")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL);
CLT_PARAMETERS.batch_run = true;
buildSeries(
true,
2); // int cuas_proc_mode); // 0 - old, 1 combine scene series) {);
return;
/* ======================================================================== */
} else if (label.equals("Aux Inter Test")) {
DEBUG_LEVEL = MASTER_DEBUG_LEVEL;
......
......@@ -277,7 +277,7 @@ public class CuasRanging {
}
}
}
if (smooth_omegas) {
if (smooth_omegas) { // may be empty
if (debugLevel > -4) {
System.out.println ("Recalculating omegas to better fit target positions in consecutive key frames.");
}
......
......@@ -918,14 +918,17 @@ min_str_neib_fpn 0.35
// targets matching parameters
public double cuas_known_err = 20; // pix, mark as "identified" when closer to the flight log position
public double cuas_tmtch_frac = 0.8; // target should match flight log in theis fraction of keyframes
public int cuas_tmtch_ends = 2; // maximal number of undetected first/last keyframes to compare to previous/next sequence
public int cuas_tmtch_gaps = 4; // maximal number of consecutive undetected keyframes of the same target
public int cuas_tmtch_ends = 6; // 2; // maximal number of undetected first/last keyframes to compare to previous/next sequence
public int cuas_tmtch_gaps = 10; // 4; // maximal number of consecutive undetected keyframes of the same target
public double cuas_tmtch_pix = 10.0; // maximal pixel mismatch for UAS target
public double cuas_tmtch_apix = 10.0; // maximal absolute pixel mismatch for the same target extrapolated with the average of the before/after lateral speeds
public double cuas_tmtch_rpix = 1.0; // maximal pixel/s mismatch for the same target extrapolated with the average of the before/after lateral speeds
public double cuas_tmtch_axv = 20.0; // m/s maximal axial (range) velocity in m/s
public double cuas_local_apix = 2.0; // maximal absolute pixel mismatch for local targets matching (tightened)
public double cuas_tmtch_apix = 5.0; // 10.0; // maximal absolute pixel mismatch for the same target extrapolated with the average of the before/after lateral speeds
public double cuas_tmtch_rpix = 1.0; // maximal pixel/s mismatch for the same target extrapolated with the average of the before/after lateral speeds
public double cuas_tmtch_axv = 50.0; //20.0; // m/s maximal axial (range) velocity in m/s
public double cuas_tmtch_axv_k = 3.0; // maximal axial (range) velocity to lateral velocity ratio (take max)
public double cuas_tmtch_disp = 0.1; // minimal disparity difference to estimate lateral velocity (smaller - consider matching)
public double cuas_local_diff = 1.5; // maximal disparity difference to match 3d for local target match (loosened for local)
public double cuas_tmtch_diff = 0.06;// maximal disparity difference to match 3d (regardless of absolute disparity)
public double cuas_tmtch_disp = 0.2; // 0.1; // minimal disparity (any should be above) to estimate lateral velocity (smaller - match2d only)
public boolean cuas_tmtch_short = true; // when multiple conflicting matches, prefer shortest gap (false - longest combo pair length)
// parameters for "radar" image generation
......@@ -2761,7 +2764,9 @@ min_str_neib_fpn 0.35
"Maxiaml undetected target gaps in the same sequence.");
gd.addNumericField("Maximal pixel mismatch for the UAS target", this.cuas_tmtch_pix, 5,8,"pix",
"Maximal pixel mismatch for the UAS target extrapolated with the average of the before/after lateral speeds.");
gd.addNumericField("Maximal lateral mismatch, same sequence", this.cuas_tmtch_apix, 5,8,"pix",
gd.addNumericField("Maximal lateral mismatch, same sequence", this.cuas_local_apix, 5,8,"pix",
"Maximal pixel mismatch for the same non-UAS target in the same sequence (tighter than inter-sequence).");
gd.addNumericField("Maximal lateral mismatch, other sequence", this.cuas_tmtch_apix, 5,8,"pix",
"Maximal pixel mismatch for the same non-UAS target extrapolated with the average of the before/after lateral speeds.");
gd.addNumericField("Maximal lateral mismatch, per second", this.cuas_tmtch_rpix, 5,8,"pix/s",
"Maximal pixel mismatch for the same target extrapolated with the average of the before/after lateral speeds.");
......@@ -2769,8 +2774,12 @@ min_str_neib_fpn 0.35
"Maximal axial (range) velocity in m/s.");
gd.addNumericField("Maximal axial to lateral ratio", this.cuas_tmtch_axv_k, 5,8,"pix",
"Maximal axial (range) velocity to lateral velocity ratio (take max axial velocity).");
gd.addNumericField("Minimal disparity difference", this.cuas_tmtch_disp, 5,8,"pix",
"Minimal disparity difference to estimate lateral velocity (smaller - consider matching).");
gd.addNumericField("Maximal disparity difference (same sequence)", this.cuas_local_diff, 5,8,"pix",
"Maximal disparity difference to match 3d for local target match (loosened for local).");
gd.addNumericField("Maximal disparity difference (other sequence)", this.cuas_tmtch_diff, 5,8,"pix",
"Maximal disparity difference to match 3d (regardless of absolute disparity.");
gd.addNumericField("Minimal disparity for 3D matching", this.cuas_tmtch_disp, 5,8,"pix",
"Minimal disparity (any should be above) to estimate lateral velocity (smaller - match2d only).");
gd.addCheckbox ("Prefer shortest gap", this.cuas_tmtch_short,
"When multiple conflicting matches, prefer shortest gap (false - longest combo pair length).");
gd.addMessage("=== Radar image generation (check Radar mode below) ===");
......@@ -3987,10 +3996,13 @@ min_str_neib_fpn 0.35
this.cuas_tmtch_ends= (int) gd.getNextNumber();
this.cuas_tmtch_gaps= (int) gd.getNextNumber();
this.cuas_tmtch_pix= gd.getNextNumber();
this.cuas_local_apix= gd.getNextNumber();
this.cuas_tmtch_apix= gd.getNextNumber();
this.cuas_tmtch_rpix= gd.getNextNumber();
this.cuas_tmtch_axv= gd.getNextNumber();
this.cuas_tmtch_axv_k= gd.getNextNumber();
this.cuas_local_diff= gd.getNextNumber();
this.cuas_tmtch_diff= gd.getNextNumber();
this.cuas_tmtch_disp= gd.getNextNumber();
this.cuas_tmtch_short = gd.getNextBoolean();
......@@ -5095,10 +5107,13 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"cuas_tmtch_ends", this.cuas_tmtch_ends+""); // int
properties.setProperty(prefix+"cuas_tmtch_gaps", this.cuas_tmtch_gaps+""); // int
properties.setProperty(prefix+"cuas_tmtch_pix", this.cuas_tmtch_pix+""); // double
properties.setProperty(prefix+"cuas_local_apix", this.cuas_local_apix+""); // double
properties.setProperty(prefix+"cuas_tmtch_apix", this.cuas_tmtch_apix+""); // double
properties.setProperty(prefix+"cuas_tmtch_rpix", this.cuas_tmtch_rpix+""); // double
properties.setProperty(prefix+"cuas_tmtch_axv", this.cuas_tmtch_axv+""); // double
properties.setProperty(prefix+"cuas_tmtch_axv_k", this.cuas_tmtch_axv_k+""); // double
properties.setProperty(prefix+"cuas_local_diff", this.cuas_local_diff+""); // double
properties.setProperty(prefix+"cuas_tmtch_diff", this.cuas_tmtch_diff+""); // double
properties.setProperty(prefix+"cuas_tmtch_disp", this.cuas_tmtch_disp+""); // double
properties.setProperty(prefix+"cuas_tmtch_short", this.cuas_tmtch_short+""); // boolean
......@@ -6179,10 +6194,13 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"cuas_tmtch_ends")!=null) this.cuas_tmtch_ends=Integer.parseInt(properties.getProperty(prefix+"cuas_tmtch_ends"));
if (properties.getProperty(prefix+"cuas_tmtch_gaps")!=null) this.cuas_tmtch_gaps=Integer.parseInt(properties.getProperty(prefix+"cuas_tmtch_gaps"));
if (properties.getProperty(prefix+"cuas_tmtch_pix")!=null) this.cuas_tmtch_pix=Double.parseDouble(properties.getProperty(prefix+"cuas_tmtch_pix"));
if (properties.getProperty(prefix+"cuas_local_apix")!=null) this.cuas_local_apix=Double.parseDouble(properties.getProperty(prefix+"cuas_local_apix"));
if (properties.getProperty(prefix+"cuas_tmtch_apix")!=null) this.cuas_tmtch_apix=Double.parseDouble(properties.getProperty(prefix+"cuas_tmtch_apix"));
if (properties.getProperty(prefix+"cuas_tmtch_rpix")!=null) this.cuas_tmtch_rpix=Double.parseDouble(properties.getProperty(prefix+"cuas_tmtch_rpix"));
if (properties.getProperty(prefix+"cuas_tmtch_axv")!=null) this.cuas_tmtch_axv=Double.parseDouble(properties.getProperty(prefix+"cuas_tmtch_axv"));
if (properties.getProperty(prefix+"cuas_tmtch_axv_k")!=null) this.cuas_tmtch_axv_k=Double.parseDouble(properties.getProperty(prefix+"cuas_tmtch_axv_k"));
if (properties.getProperty(prefix+"cuas_local_diff")!=null) this.cuas_local_diff=Double.parseDouble(properties.getProperty(prefix+"cuas_local_diff"));
if (properties.getProperty(prefix+"cuas_tmtch_diff")!=null) this.cuas_tmtch_diff=Double.parseDouble(properties.getProperty(prefix+"cuas_tmtch_diff"));
if (properties.getProperty(prefix+"cuas_tmtch_disp")!=null) this.cuas_tmtch_disp=Double.parseDouble(properties.getProperty(prefix+"cuas_tmtch_disp"));
if (properties.getProperty(prefix+"cuas_tmtch_short")!=null) this.cuas_tmtch_short=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_tmtch_short"));
......@@ -7251,10 +7269,13 @@ min_str_neib_fpn 0.35
imp.cuas_tmtch_ends = this.cuas_tmtch_ends;
imp.cuas_tmtch_gaps = this.cuas_tmtch_gaps;
imp.cuas_tmtch_pix = this.cuas_tmtch_pix;
imp.cuas_local_apix = this.cuas_local_apix;
imp.cuas_tmtch_apix = this.cuas_tmtch_apix;
imp.cuas_tmtch_rpix = this.cuas_tmtch_rpix;
imp.cuas_tmtch_axv = this.cuas_tmtch_axv;
imp.cuas_tmtch_axv_k = this.cuas_tmtch_axv_k;
imp.cuas_tmtch_diff = this.cuas_tmtch_diff;
imp.cuas_local_diff = this.cuas_local_diff;
imp.cuas_tmtch_disp = this.cuas_tmtch_disp;
imp.cuas_tmtch_short = this.cuas_tmtch_short;
......
......@@ -8951,14 +8951,27 @@ if (debugLevel > -100) return true; // temporarily !
}
break; // case 0 :
case 1:
CuasMultiSeries cuasMultiSeries = new CuasMultiSeries(
{CuasMultiSeries cuasMultiSeries = new CuasMultiSeries(
clt_parameters, // CLTParameters clt_parameters,
uasLogReader, //UasLogReader uasLogReader,
false, // boolean video_mode,
uasLogReader, // UasLogReader uasLogReader,
quadCLT_main, // QuadCLT quadCLT_main,
quadCLT_main.correctionsParameters.linkedCenters,
quadCLT_main.correctionsParameters.x3dModelVersion);
// CuasMultiSeries (String path)
cuasMultiSeries.processGlobals();
cuasMultiSeries.processGlobals();}
break;
case 2:
{CuasMultiSeries cuasMultiSeries = new CuasMultiSeries(
clt_parameters, // CLTParameters clt_parameters,
true, // boolean video_mode,
uasLogReader, // UasLogReader uasLogReader,
quadCLT_main, // QuadCLT quadCLT_main,
quadCLT_main.correctionsParameters.linkedCenters,
quadCLT_main.correctionsParameters.x3dModelVersion);
// CuasMultiSeries (String path)
cuasMultiSeries.combineVideos();
}
break;
} // switch (cuas_proc_mode) {
......
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