Gravity-aligned Rotation Averaging with Circular Regression
May 12, 2025 · View on GitHub
Project page | Paper | Supp.
About
This project aims at solving the rotation averaging problem with gravity prior. To achieve this, circular regression is leveraged.
If you use this project for your research, please cite
@inproceedings{pan2024ra1dof,
author={Pan, Linfei and Pollefeys, Marc and Barath, Daniel},
title={{Gravity-aligned Rotation Averaging with Circular Regression}},
booktitle={European Conference on Computer Vision (ECCV)},
year={2024},
}
Getting Started
Install GLOMAP as instrcucted in README. Then, call the rotation averager (3 degree-of-freedom) via
glomap rotation_averager --relpose_path RELPOSE_PATH --output_path OUTPUT_PATH
If gravity directions are available, call the rotation averager (1 degree-of-freedom) via
glomap rotation_averager \
--relpose_path RELPOSE_PATH \
--output_path OUTPUT_PATH \
--gravity_path GRAVTIY PATH
It is recommended to set --use_stratified=1 if only a subset of images have gravity direction.
If gravity measurements are subject to i.i.d. noise, they can be refined by setting --refine_gravity=1.
File Formats
Relative Pose
The relative pose file is expected to be of the following format
IMAGE_NAME_1 IMAGE_NAME_2 QW QX QY QZ TX TY TZ
Only images contained in at least one relative pose will be included in the following procedure. The relative pose should be 2R1 x1 + 2t1 = x2.
Gravity Direction
The gravity direction file is expected to be of the following format
IMAGE_NAME GX GY GZ
The gravity direction should if the image is orthogonal to the ground plane, and the estimated rotation would have the property that . More explicitly, suppose we can transpose a 3D point from the world coordinate to the image coordinate by RX + t = x. Here:
Ris a 3x3 rotation matrix that aligns the world coordinate system with the image coordinate system.Xis a 3D point in the world coordinate system.tis a 3x1 translation vector that shifts the world coordinate system to the image coordinate system.xis the corresponding 3D point in the image coordinate system. The gravity direction should be the second column of the rotation matrixR.
It is acceptable if only a subset of all images have gravity direction. If the specified image name does not match any known image name from relative pose, it is ignored.
Output
The estimated global rotation will be in the following format
IMAGE_NAME QW QX QY QZ
Any images that are not within the largest connected component of the view-graph formed by the relative pose will be ignored.