Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

GlobalPositioner

Created by Codex.

Jointly estimate camera and landmark positions with the Bilinear Angle-based Translation Averaging (BATA) model used by GLOMAP (Global Structure-from-Motion Revisited).

Open In Colab

Mathematical idea

For camera position CiC_i, landmark position PjP_j, and world-frame unit bearing uiju_{ij}, each observation contributes the BATA residual

rij=∣sij∣(Pj−Ci)−uij.r_{ij}=|s_{ij}|(P_j-C_i)-u_{ij}.

One scale sijs_{ij} is optimized per observation. BATA means Bilinear Angle-based Translation Averaging; see Zhuang, Cheong, and Lee, Baseline Desensitizing in Translation Averaging, IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2018. Direction-only data leaves global translation and scale gauges, so anchoring and metric information remain essential.

Problem structure

GlobalPositioner specializes LocationRecovery for a bipartite camera-landmark graph. It always uses bilinear BATA factors, validates that the anchor is a camera, initializes one scale per observation, and runs Levenberg-Marquardt.

The input directions must point from the camera key (key1) to the landmark key (key2) in a common world frame.

measurement factors plus anchor: 5
initial keys: [5980780305148018688, 5980780305148018689, 5980780305148018690, 5980780305148018691, 7133701809754865664, 7133701809754865665, 8070450532247928832, 8070450532247928833]

Running a real problem

Call positioner.run(directions, camera_keys, landmark_keys, anchor_camera, initial) once the graph is well connected and the initialization contains any available metric information. A direction-only problem retains a global scale ambiguity; in production, seed or constrain scale through the surrounding reconstruction pipeline and check rank if LM reports an indeterminate system.