Commit ede9c9b0 authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: Fix filterConv5dROI suppression condition

Suppress a point only when both conditions hold simultaneously:
  thresh = Math.max(athresh, M * rthresh)
  (M - val) >= thresh   →   zero the point

athresh enforces a minimum absolute gap; M*rthresh enforces a minimum
relative gap. Math.max means BOTH must be satisfied (either alone is
insufficient). Replaces the previous M>=athresh && val<rthresh*M logic.
Co-authored-by: 's avatarClaude <claude@elphel.com>
parent 1f1d501c
...@@ -1552,7 +1552,8 @@ public class CuasRTUtils { ...@@ -1552,7 +1552,8 @@ public class CuasRTUtils {
} }
} }
} }
result[roi_pix][sub_idx][v_out_idx] = (M >= athresh && val < rthresh * M) ? 0 : val; double thresh = Math.max(athresh, M * rthresh);
result[roi_pix][sub_idx][v_out_idx] = ((M - val) >= thresh) ? 0 : val;
} }
} }
} }
...@@ -1594,7 +1595,8 @@ public class CuasRTUtils { ...@@ -1594,7 +1595,8 @@ public class CuasRTUtils {
} }
} }
} }
result[roi_pix][sub_idx][v_out_idx] = (M >= athresh && val < rthresh * M) ? 0 : val; double thresh = Math.max(athresh, M * rthresh);
result[roi_pix][sub_idx][v_out_idx] = ((M - val) >= thresh) ? 0 : val;
} }
} }
} }
......
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