Skip to content

[geometry] Preserve rotation axis signs at exact half turns - #2191

Merged
servantftransperfect merged 1 commit into
alicevision:developfrom
Arthur031221:fix-so3-half-turn-log
Oct 6, 2026
Merged

servantftransperfect merged 1 commit into
alicevision:developfrom
Arthur031221:fix-so3-half-turn-log

Conversation

@Arthur031221

Copy link
Copy Markdown
Contributor

Description

Users working with synthetic relative poses can load a different rotation from pairs JSON for an exact symmetric half turn.

In a noise-free reproduction with E = diag(0, 1, -1) and 12 fixed correspondences, estimateTransformStructureFromEssential returns an exact symmetric half-turn. Its JSON round trip changes two rotation entries from -1 to +1 before the fix. The fixed round trip preserves the rotation within 1e-12.

Features list

  • Recover the axis signs used to serialize half-turn relative poses.
  • Add deterministic log/exp round-trip tests for exact and near half turns.

Implementation remarks

The near-pi branch selects the largest diagonal entry of the symmetric matrix instead of using antisymmetric differences, which vanish at an exact half turn.

The exact-half-turn test fails with the original header and passes with the fix. All 24 near-half-turn cases pass with both headers. Validation covers the five geometry test executables, which passed twice.

@cbentejac cbentejac added this to the 3.4.0 milestone Oct 5, 2026
@cbentejac
cbentejac force-pushed the fix-so3-half-turn-log branch from 5ea1018 to 5ee2894 Compare October 5, 2026 14:38

@servantftransperfect servantftransperfect left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks a lot.

@servantftransperfect
servantftransperfect merged commit 9ce7fc9 into alicevision:develop Oct 6, 2026
4 checks passed
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.

3 participants