Commit a86749dc authored by Andrey Filippov's avatar Andrey Filippov

Debugging for low-contrast targets

parent 7b258199
......@@ -255,7 +255,12 @@ public class CuasRanging {
cuasMotion.getTilesY(), // int height,
center_CLT.getImageName()+"-NOISE-MAP"); //String [] titles)
center_CLT.saveImagePlusInModelDirectory(imp_noise_map); // ImagePlus imp)
ImagePlus imp_noise_map8 = ShowDoubleFloatArrays.makeArrays(
cuasMotion.getNoiseMap8(), // float[][] pixels,
cuasMotion.getTilesX(), // int width,
cuasMotion.getTilesY(), // int height,
center_CLT.getImageName()+"-NOISE-MAP8"); //String [] titles)
center_CLT.saveImagePlusInModelDirectory(imp_noise_map8); // ImagePlus imp)
}
......
......@@ -872,8 +872,12 @@ min_str_neib_fpn 0.35
// CUAS Motion LMA filter parameters
public double cuas_lma_rms = 1.5; // 1.5; // Maximal RMS (should always match, regardless if A)
public double cuas_lma_arms = 0.37; // 0.06; // Maximal absolute RMS (should match one of cuas_lma_arms OR cuas_lma_rrms (0.484)
public double cuas_lma_rrms = 0.28; // 0.15; // Maximal relative to A rms. OK is when (RMS < cuas_lma_arms) || (RMS < cuas_lma_rrms * A)
public double cuas_lma_mina = 0.4; // 1.0; // Minimal A (amplitude) = 1.0 (< 2.0)
public double cuas_lma_rrms = 0.5; // 0.35; // 0.28; // 0.15; // Maximal relative to A rms. OK is when (RMS < cuas_lma_arms) || (RMS < cuas_lma_rrms * A)
public double cuas_lma_rrms2 = 0.35; // 0.28; // 0.15; // Maximal relative to A rms. OK is when (RMS < cuas_lma_arms) || (RMS < cuas_lma_rrms * A)
public double cuas_lma_mina = 0.25; // 0.4; // 1.0; // Minimal A (amplitude) = 1.0 (< 2.0)
public double cuas_lma_mina2 = 0.4; // 1.0; // Minimal A (amplitude) = 1.0 (< 2.0)
public double cuas_lma_pre_mina = 0.5; // scale cuas_lma_mina to filter initial candidates (if there are > one of them)
public int cuas_min_keep = 2; // keep at least this number of candidates before using cuas_lma_pre_mina filter
......@@ -913,6 +917,7 @@ min_str_neib_fpn 0.35
public double cuas_offcenter = 0.6; // maximal off-center relative to the tile size (0.5 - how it was, +/-4 pix)
public double cuas_scale_wnd = 2.0; // When building noise map, scale search window range from original -8..+7 (2.0 -> -16..+15).
public double cuas_noisemax = 10.0; // when (max-min) of a 16-pixel tile exceeds this, do not fail on far offcenter
public double cuas_noisemax8 = 50.0; // when (max-min) of a 8-pixel tile exceeds this, do not consider it
public boolean cuas_fail_mismatch = false; // fail high mismatch early
public boolean cuas_ignore_mismatch = false; // calculate mismatch but do not remove
......@@ -2847,9 +2852,13 @@ min_str_neib_fpn 0.35
"Maximal RMS for target that should match always, regardless of the amplitude.");
gd.addNumericField("Maximal sufficient RMS", this.cuas_lma_arms, 5,8,"",
"Maximal sufficient RMS for target. Satisfying any of the sufficient or relative is enough");
gd.addNumericField("Maximal relative RMS", this.cuas_lma_rrms, 5,8,"",
gd.addNumericField("Maximal relative RMS, first pass", this.cuas_lma_rrms, 5,8,"",
"Maximal relative (to amplitude) RMS for target. Satisfying any of the absolute and relative is sufficient");
gd.addNumericField("Minimal target amplitude", this.cuas_lma_mina, 5,8,"",
gd.addNumericField("Maximal relative RMS, centered", this.cuas_lma_rrms2, 5,8,"",
"Maximal relative (to amplitude) RMS for target. Satisfying any of the absolute and relative is sufficient");
gd.addNumericField("Minimal target amplitude, first pass", this.cuas_lma_mina, 5,8,"",
"Filter out weak targets.");
gd.addNumericField("Minimal target amplitude, centered", this.cuas_lma_mina2, 5,8,"",
"Filter out weak targets.");
gd.addNumericField("Scale minimal amplitude", this.cuas_lma_pre_mina, 5,8,"",
"Scale cuas_lma_mina to filter initial candidates (if there are > one of them).");
......@@ -2918,8 +2927,10 @@ min_str_neib_fpn 0.35
"Maximal relative offset of the maximum as a fraction of ther tile size (0.5 -> +/-4 pix).");
gd.addNumericField("Scale min/max search window", this.cuas_scale_wnd, 5,8,"",
"When building noise map, scale search window range from original -8..+7 (2.0 -> -16..+15).");
gd.addNumericField("\"Maximal variations for \"far\" failures.", this.cuas_noisemax, 5,8,"",
gd.addNumericField("Maximal variations for \"far\" failures.", this.cuas_noisemax, 5,8,"",
"When (max-min) of a 16-pixel tile exceeds this, do not fail on far offcenter.");
gd.addNumericField("Maximal pixel variation in a sky tile", this.cuas_noisemax8, 5,8,"",
"When (max-min) of a 8-pixel tile exceeds this, do not use it (terrain background).");
gd.addCheckbox ("Fail mismatch early", this.cuas_fail_mismatch,
"Fail after score calculation if there is not match both before and after.");
......@@ -4450,7 +4461,9 @@ min_str_neib_fpn 0.35
this.cuas_lma_rms = gd.getNextNumber();
this.cuas_lma_arms = gd.getNextNumber();
this.cuas_lma_rrms = gd.getNextNumber();
this.cuas_lma_rrms2 = gd.getNextNumber();
this.cuas_lma_mina = gd.getNextNumber();
this.cuas_lma_mina2 = gd.getNextNumber();
this.cuas_lma_pre_mina = gd.getNextNumber();
this.cuas_min_keep = (int) gd.getNextNumber();
......@@ -4488,6 +4501,7 @@ min_str_neib_fpn 0.35
this.cuas_offcenter = gd.getNextNumber();
this.cuas_scale_wnd = gd.getNextNumber();
this.cuas_noisemax = gd.getNextNumber();
this.cuas_noisemax8 = gd.getNextNumber();
this.cuas_fail_mismatch = gd.getNextBoolean();
this.cuas_ignore_mismatch = gd.getNextBoolean();
......@@ -5756,7 +5770,9 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"cuas_lma_rms", this.cuas_lma_rms+""); // double
properties.setProperty(prefix+"cuas_lma_arms", this.cuas_lma_arms+""); // double
properties.setProperty(prefix+"cuas_lma_rrms", this.cuas_lma_rrms+""); // double
properties.setProperty(prefix+"cuas_lma_rrms2", this.cuas_lma_rrms2+""); // double
properties.setProperty(prefix+"cuas_lma_mina", this.cuas_lma_mina+""); // double
properties.setProperty(prefix+"cuas_lma_mina2", this.cuas_lma_mina2+""); // double
properties.setProperty(prefix+"cuas_lma_pre_mina", this.cuas_lma_pre_mina+""); // double
properties.setProperty(prefix+"cuas_min_keep", this.cuas_min_keep+""); // int
......@@ -5794,6 +5810,7 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"cuas_offcenter", this.cuas_offcenter+""); // double
properties.setProperty(prefix+"cuas_scale_wnd", this.cuas_scale_wnd+""); // double
properties.setProperty(prefix+"cuas_noisemax", this.cuas_noisemax+""); // double
properties.setProperty(prefix+"cuas_noisemax8", this.cuas_noisemax8+""); // double
properties.setProperty(prefix+"cuas_fail_mismatch", this.cuas_fail_mismatch+""); // boolean
properties.setProperty(prefix+"cuas_ignore_mismatch", this.cuas_ignore_mismatch+"");// boolean
......@@ -7004,7 +7021,9 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"cuas_lma_rms")!=null) this.cuas_lma_rms=Double.parseDouble(properties.getProperty(prefix+"cuas_lma_rms"));
if (properties.getProperty(prefix+"cuas_lma_arms")!=null) this.cuas_lma_arms=Double.parseDouble(properties.getProperty(prefix+"cuas_lma_arms"));
if (properties.getProperty(prefix+"cuas_lma_rrms")!=null) this.cuas_lma_rrms=Double.parseDouble(properties.getProperty(prefix+"cuas_lma_rrms"));
if (properties.getProperty(prefix+"cuas_lma_rrms2")!=null) this.cuas_lma_rrms2=Double.parseDouble(properties.getProperty(prefix+"cuas_lma_rrms2"));
if (properties.getProperty(prefix+"cuas_lma_mina")!=null) this.cuas_lma_mina=Double.parseDouble(properties.getProperty(prefix+"cuas_lma_mina"));
if (properties.getProperty(prefix+"cuas_lma_mina2")!=null) this.cuas_lma_mina2=Double.parseDouble(properties.getProperty(prefix+"cuas_lma_mina2"));
if (properties.getProperty(prefix+"cuas_lma_pre_mina")!=null) this.cuas_lma_pre_mina=Double.parseDouble(properties.getProperty(prefix+"cuas_lma_pre_mina"));
if (properties.getProperty(prefix+"cuas_min_keep")!=null) this.cuas_min_keep=Integer.parseInt(properties.getProperty(prefix+ "cuas_min_keep"));
......@@ -7039,6 +7058,7 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"cuas_offcenter")!=null) this.cuas_offcenter=Double.parseDouble(properties.getProperty(prefix+"cuas_offcenter"));
if (properties.getProperty(prefix+"cuas_scale_wnd")!=null) this.cuas_scale_wnd=Double.parseDouble(properties.getProperty(prefix+"cuas_scale_wnd"));
if (properties.getProperty(prefix+"cuas_noisemax")!=null) this.cuas_noisemax=Double.parseDouble(properties.getProperty(prefix+"cuas_noisemax"));
if (properties.getProperty(prefix+"cuas_noisemax8")!=null) this.cuas_noisemax8=Double.parseDouble(properties.getProperty(prefix+"cuas_noisemax8"));
if (properties.getProperty(prefix+"cuas_fail_mismatch")!=null) this.cuas_fail_mismatch=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_fail_mismatch"));
if (properties.getProperty(prefix+"cuas_ignore_mismatch")!=null) this.cuas_ignore_mismatch=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_ignore_mismatch"));
......@@ -8265,7 +8285,9 @@ min_str_neib_fpn 0.35
imp.cuas_lma_rms = this.cuas_lma_rms;
imp.cuas_lma_arms = this.cuas_lma_arms;
imp.cuas_lma_rrms = this.cuas_lma_rrms;
imp.cuas_lma_rrms2 = this.cuas_lma_rrms2;
imp.cuas_lma_mina = this.cuas_lma_mina;
imp.cuas_lma_mina2 = this.cuas_lma_mina2;
imp.cuas_lma_pre_mina = this.cuas_lma_pre_mina;
imp.cuas_min_keep = this.cuas_min_keep;
......@@ -8300,6 +8322,7 @@ min_str_neib_fpn 0.35
imp.cuas_offcenter = this.cuas_offcenter;
imp.cuas_scale_wnd = this.cuas_scale_wnd;
imp.cuas_noisemax = this.cuas_noisemax;
imp.cuas_noisemax8 = this.cuas_noisemax8;
imp.cuas_fail_mismatch = this.cuas_fail_mismatch;
imp.cuas_ignore_mismatch = this.cuas_ignore_mismatch;
......
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