Commit cc0c0f86 authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: Honor curt_save_select ROI in synthetic mode (fix SYNTH_ROI OOM)

Synthetic mode previously force-overrode the ROI with the full-grid
SYNTH_ROI (320x320). showConvKernel5d expands each ROI pixel by
(vout_dim+1)*sub_dim per axis, so 320x320 blows the heap. Now synthetic
mode uses curt_save_select directly and falls back to SYNTH_ROI only
when no ROI is set, so the user can shrink it to a slice of the grid.
Co-Authored-By: 's avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
parent 9d06cce7
...@@ -599,9 +599,14 @@ public class CuasDetectRT { ...@@ -599,9 +599,14 @@ public class CuasDetectRT {
boolean curt_save_c5full = clt_parameters.imp.curt_save_c5full; boolean curt_save_c5full = clt_parameters.imp.curt_save_c5full;
boolean curt_save_c5rect = clt_parameters.imp.curt_save_c5rect; boolean curt_save_c5rect = clt_parameters.imp.curt_save_c5rect;
Rectangle curt_save_select = clt_parameters.imp.curt_save_select; Rectangle curt_save_select = clt_parameters.imp.curt_save_select;
if (clt_parameters.imp.curt_synth_src) { // synthetic targets live in their own block - keep the stored ROI matching the real image // By Claude on 06/11/2026 if (clt_parameters.imp.curt_synth_src) { // synthetic grid: HONOR the user ROI so it can be shrunk - the full-grid SYNTH_ROI (320x320) OOMs the per-velocity render (~12x expansion per axis); fall back to SYNTH_ROI only when no ROI is set // By Claude on 06/15/2026
if (curt_save_select == null) {
curt_save_select = new Rectangle(SYNTH_ROI); curt_save_select = new Rectangle(SYNTH_ROI);
System.out.println("Synthetic input: overriding ROI with SYNTH_ROI = "+curt_save_select); System.out.println("Synthetic input: no ROI set - using full-grid SYNTH_ROI = "+curt_save_select);
} else {
System.out.println("Synthetic input: using curt_save_select ROI = "+curt_save_select
+ " (synthetic 11x11 grid spans ~"+SYNTH_ROI+"; aim the ROI inside it)"); // By Claude on 06/15/2026
}
} }
final double min_frac_last = clt_parameters.imp.curt_min_frac; // By Claude on 06/12/2026 final double min_frac_last = clt_parameters.imp.curt_min_frac; // By Claude on 06/12/2026
if (clt_parameters.imp.curt_synth_src && (min_frac_last > 0)) { // By Claude on 06/12/2026 if (clt_parameters.imp.curt_synth_src && (min_frac_last > 0)) { // By Claude on 06/12/2026
......
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