Commit 472435db authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: CuasPoseRT phase A - RT pose-adjustment prototype (curt_pose_test)

Top-level scene iterator re-generating per-scene 3-angle poses against the
persistent virtual-center reference, RT-style: ascending time order, zero-order
prediction seeding (fit anchored to the center, prediction only warm-starts the
LMA), single pass on the final combo DSI (no refinement pass - it only existed
because disparity arrived after initial orientations offline). Measurement
engine = proven Interscene.adjustPairsLMAInterscene (reference GPU data set
once); phase B will swap it for the lean TD-average x virtual-center path with
GPU argmax+eigen kernels, keeping this iterator + CSV as the oracle.

- new cuas/rt/CuasPoseRT.testPoseSequence(): reference prep (strength>
  curt_pose_str tile selection, setReferenceGPU with center CLT), stored-pose
  seed/truth from center ErsCorrection scenes_poses, per-scene fit with 3-angle
  param_select (XYZ locked), ERS dt from pose finite differences (disable_ers),
  MB off, coast-on-failure; writes -POSE-RT-TEST.csv + fitted-vs-stored summary
- params curt_pose_test (bool) + curt_pose_str (1.0) - 6 plumbing sites
- OpticalFlow curt_en branch: curt_pose_test runs INSTEAD of detection

Build: mvn compile clean. Runtime validation pending (Eclipse/Eyesis run on
sequence 1773135476_186641, truth = re-adjusted stored poses).
Co-Authored-By: 's avatarClaude Fable 5 <noreply@anthropic.com>
parent 5e14bb72
This diff is collapsed.
......@@ -1127,6 +1127,8 @@ min_str_neib_fpn 0.35
public boolean curt_en = true; // enable cuas rt calculation (not needed with a separate button)
public boolean curt_calib = false; // first step of the CUAS RT processing flow: per-sensor photometric (re)calibration - fit a+b*x over safe (weak/far) tiles, fold into the 16+16 lwir offsets/scales, apply + save (reference scene INTERFRAME corr-xml, quadCLT_main -> main config). Bypass when off. // By Claude on 07/03/2026
public boolean curt_cond_test = false; // conditioning/calibration isolation test inside the curt_en branch: build the QuadCLT instances (borrowed calibration) then print per-sensor average spread (CuasMotion.perSensorAveragesFromTD) instead of normal RT detection; well-calibrated -> 16 sensor averages match (spread ~0). // By Claude on 07/01/2026
public boolean curt_pose_test = false; // RT pose-adjustment prototype (phase A) inside the curt_en branch: re-generate per-scene 3-angle poses against the virtual-center reference, ascending, prediction-seeded (CuasPoseRT.testPoseSequence) instead of RT detection; writes -POSE-RT-TEST.csv + fitted-vs-stored summary. // By Claude on 07/03/2026
public double curt_pose_str = 1.0; // reliable-tile strength threshold over the combo-DSI strength for the pose test tile selection (1.0 ~ old getReliableTiles population). // By Claude on 07/03/2026
//=== LoG prefilter ===
public double curt_psf_radius = 1.0; // sensor PSF radius for LoG pre-filter
public double curt_n_sigma = 4.0; // cutoff LoG kernel array, number of sigmas
......@@ -3416,6 +3418,10 @@ min_str_neib_fpn 0.35
"First step of the RT processing flow: per-sensor photometric (re)calibration - fit a+b*x over safe (weak/far) tiles, fold into the 16+16 lwir offsets/scales, apply and save (reference scene INTERFRAME corr-xml, quadCLT_main for the main configuration). Bypass when off.");
gd.addCheckbox ("CUAS RT conditioning test", this.curt_cond_test,
"Isolation test inside the curt_en branch: build QuadCLT instances (borrowed calibration), then print per-sensor average spread (CuasMotion.perSensorAveragesFromTD) instead of normal RT detection. Well-calibrated -> the 16 sensor averages match (spread ~0).");
gd.addCheckbox ("CUAS RT pose test", this.curt_pose_test, // By Claude on 07/03/2026
"RT pose-adjustment prototype (phase A): re-generate per-scene 3-angle poses against the virtual-center reference (ascending, prediction-seeded) instead of RT detection. Writes -POSE-RT-TEST.csv and a fitted-vs-stored summary.");
gd.addNumericField("Pose test reliable strength", this.curt_pose_str, 5,7,"", // By Claude on 07/03/2026
"Tile selection for the pose test: combo-DSI strength threshold (1.0 gives ~ the old getReliableTiles population).");
gd.addMessage("=== LoG prefilter ===");
gd.addNumericField("Optical PSF radius", this.curt_psf_radius, 6,8,"pix",
......@@ -5008,6 +5014,8 @@ min_str_neib_fpn 0.35
this.curt_en = gd.getNextBoolean();
this.curt_calib = gd.getNextBoolean(); // By Claude on 07/03/2026
this.curt_cond_test = gd.getNextBoolean();
this.curt_pose_test = gd.getNextBoolean(); // By Claude on 07/03/2026
this.curt_pose_str = gd.getNextNumber(); // By Claude on 07/03/2026
this.curt_psf_radius = gd.getNextNumber();
this.curt_n_sigma = gd.getNextNumber();
......@@ -6374,6 +6382,8 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"curt_en", this.curt_en+""); // boolean
properties.setProperty(prefix+"curt_calib", this.curt_calib+""); // boolean // By Claude on 07/03/2026
properties.setProperty(prefix+"curt_cond_test", this.curt_cond_test+""); // boolean
properties.setProperty(prefix+"curt_pose_test", this.curt_pose_test+""); // boolean // By Claude on 07/03/2026
properties.setProperty(prefix+"curt_pose_str", this.curt_pose_str+""); // double // By Claude on 07/03/2026
properties.setProperty(prefix+"curt_psf_radius", this.curt_psf_radius+""); // double
properties.setProperty(prefix+"curt_n_sigma", this.curt_n_sigma+""); // double
......@@ -6774,6 +6784,8 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"curt_en")!=null) this.curt_en=Boolean.parseBoolean(properties.getProperty(prefix+"curt_en"));
if (properties.getProperty(prefix+"curt_calib")!=null) this.curt_calib=Boolean.parseBoolean(properties.getProperty(prefix+"curt_calib")); // By Claude on 07/03/2026
if (properties.getProperty(prefix+"curt_cond_test")!=null) this.curt_cond_test=Boolean.parseBoolean(properties.getProperty(prefix+"curt_cond_test"));
if (properties.getProperty(prefix+"curt_pose_test")!=null) this.curt_pose_test=Boolean.parseBoolean(properties.getProperty(prefix+"curt_pose_test")); // By Claude on 07/03/2026
if (properties.getProperty(prefix+"curt_pose_str")!=null) this.curt_pose_str=Double.parseDouble(properties.getProperty(prefix+"curt_pose_str")); // By Claude on 07/03/2026
if (properties.getProperty(prefix+"curt_psf_radius")!=null) this.curt_psf_radius=Double.parseDouble(properties.getProperty(prefix+"curt_psf_radius"));
if (properties.getProperty(prefix+"curt_n_sigma")!=null) this.curt_n_sigma=Double.parseDouble(properties.getProperty(prefix+"curt_n_sigma"));
......@@ -9059,6 +9071,8 @@ min_str_neib_fpn 0.35
imp.curt_en = this.curt_en;
imp.curt_calib = this.curt_calib; // By Claude on 07/03/2026
imp.curt_cond_test = this.curt_cond_test;
imp.curt_pose_test = this.curt_pose_test; // By Claude on 07/03/2026
imp.curt_pose_str = this.curt_pose_str; // By Claude on 07/03/2026
imp.curt_psf_radius = this.curt_psf_radius;
imp.curt_n_sigma = this.curt_n_sigma;
// rleak0 imp.X copy removed 2026-06-20 (LReLU now LINEAR); predecessor code at git tag cuas-layer1. // By Claude on 06/20/2026
......
......@@ -7289,7 +7289,19 @@ java.lang.NullPointerException
ImageDtt.THREADS_MAX, // int threadsMax,
debugLevel); // int debugLevel
}
if (clt_parameters.imp.curt_cond_test) {
if (clt_parameters.imp.curt_pose_test) {
// RT pose-adjustment prototype phase A (curt_pose_test), runs INSTEAD of RT detection:
// re-generate per-scene 3-angle poses against the virtual-center reference, ascending,
// prediction-seeded, single pass on the final combo DSI. Output: -POSE-RT-TEST.csv +
// fitted-vs-stored summary (truth = scenes_poses restored from INTERFRAME corr-xml).
// By Claude on 07/03/2026, from Andrey's design.
System.out.println("===== CUAS RT pose test (curt_pose_test): per-scene 3-angle fit vs virtual center =====");
com.elphel.imagej.cuas.rt.CuasPoseRT.testPoseSequence(
clt_parameters, // CLTParameters clt_parameters,
master_CLT, // QuadCLT center_CLT,
quadCLTs, // QuadCLT [] quadCLTs,
debugLevel); // int debugLevel
} else if (clt_parameters.imp.curt_cond_test) {
// Conditioning/calibration diagnostic (curt_cond_test), runs INSTEAD of RT detection:
// raw /jp4/ baseline (no photometric/FPN/conditioning), saved as -CUAS-PERSENSOR-RAW for
// side-by-side compare with the conditioned -CUAS-PERSENSOR (saved by the calibration step when
......
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