Skip to content

Batch of small fixes - #1007

Merged
mprib merged 5 commits into
mainfrom
fix/markerless-gate-fixes
Jul 20, 2026
Merged

Batch of small fixes#1007
mprib merged 5 commits into
mainfrom
fix/markerless-gate-fixes

Conversation

@mprib

@mprib mprib commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Five small fixes from the July 15 review round. One commit each.

Camera 0 anchor treated as unset

apply_to checked the anchor camera for truthiness (if anchor_cam:), so camera 0 read as unset and fell through to auto-selection (src/caliscope/core/bootstrap_pose/paired_pose_network.py:195). Fixed to is not None. The regression test builds a three-camera network where auto-selection picks a different anchor than camera 0. The test fails without the fix.

Non-contiguous camera ID canary

Every epipolar test scene used contiguous IDs 0 through n-1. That let code silently confuse camera IDs with array indices. The new scene drops cameras 0, 3, and 4 from a six-camera ring, leaving IDs {1, 2, 5}, and runs the 2D-only path through the production seam. Measured worst error: 0.062 deg / 1.14 mm against bounds of 0.5 deg / 10 mm.

Robust floor in grounded()

The floor was the single minimum world-Z value. One spurious low triangulation could bury it. Now it uses the 1st percentile as an order statistic (np.percentile(z, 1.0, method="lower")). On small point sets this degrades to the exact minimum. The existing two-point grounding test passes unchanged. New tests: a 200-point band with one low outlier rests at ~0 after grounding. A clean dense volume still grounds to its true minimum.

Cross-camera vertical disagreement in oriented()

The consensus vertical averaged per-camera up vectors but discarded how much they disagreed. Cross-camera agreement is the accuracy signal. Each camera's angle from the consensus and the max pairwise disagreement are now logged in degrees. This is log-only. The rotation is unchanged. The module logger is also named by __name__ instead of __file__, matching the other 75 modules so subscribers can find it.

Dead new_camera_data chain deleted

The signal had zero connect sites in src or tests. Removed the signal, push_camera_data, its two call sites, the stale docstring sentence, CameraData.get_display_data (whose only caller was the deleted helper), and the orphaned OrderedDict imports. 95 lines removed. No behavior change.

mprib added 5 commits July 19, 2026 13:18
A falsy check dropped camera 0 into anchor auto-selection. Guard on
'is not None' instead. Regression test hand-builds a three-camera
network where auto-selection prefers a different anchor, so the test
fails without the fix.
All epipolar scenes used contiguous ids 0..n-1, so cam_id/index
conflation could pass unnoticed. New scene drops cameras 0, 3, 4 from
a six-ring, leaving ids {1, 2, 5}, and drives the 2D-only path through
the production seam. Measured worst error 0.062 deg / 1.14 mm against
0.5 deg / 10 mm bounds.
The floor was the single minimum world Z, so one spurious low
triangulation buried it and floated the whole scene. Use the 1st
percentile with method='lower': an order statistic that degrades to
the exact minimum on small point sets, leaving existing behavior and
tests unchanged, while skipping stray low points on dense clouds.
The consensus vertical averaged per-camera ups and discarded how much
they disagreed, though cross-camera agreement is the accuracy signal
for the vertical. Log each camera's angle from the consensus and the
max pairwise disagreement in degrees. Log-only; the rotation is
unchanged. Also name the module logger by __name__ instead of
__file__, matching the rest of the codebase, so subscribers can find
it under caliscope.core.capture_volume.
The signal had no connect sites anywhere in src or tests; every emit
went unheard. Remove the signal, push_camera_data, its two call
sites, and the stale docstring sentence. CameraData.get_display_data
lost its only caller, so it goes too, along with the orphaned
OrderedDict imports in both files.
@mprib mprib changed the title Markerless gate fixes: anchor_cam=0, gapped cam_ids, robust floor, vertical agreement, dead signal Batch of small fixes Jul 20, 2026
@mprib
mprib merged commit 22d0e48 into main Jul 20, 2026
5 checks passed
@mprib
mprib deleted the fix/markerless-gate-fixes branch July 20, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant