Conversation
glomap/math/gravity.h
Outdated
| Eigen::Matrix3d AngleToRotUp(double angle); | ||
|
|
||
| // Estimate the average gravity direction from a set of gravity directions | ||
| Eigen::Vector3d AverageGravity(std::vector<Eigen::Vector3d>& gravities); |
There was a problem hiding this comment.
Does it make sense to write a few unit tests for this function?
There was a problem hiding this comment.
For average gravity? Or for rotation averaging? For average gravity, I think it is simply some SVD. For the rotation averaging, then I would need to design it a bit :)
| bool use_stratified = true; | ||
| }; | ||
|
|
||
| class RotationAverager { |
There was a problem hiding this comment.
So, this only solves the gravity aligned rotation averaging problem and is not a general interface for rotation averaging? Why is this a separate, new class? Otherwise, a more specific name would be preferable?
There was a problem hiding this comment.
No, the interface is for both 3DoF RA and 1DoF RA. If gravity direction is not provided, then the original 3DoF will be applied
There was a problem hiding this comment.
Thanks for clarifying. It feels odd that this is a class. Why not just make it a function?
Co-authored-by: Johannes Schönberger <joschonb@microsoft.com>
| // If there is no image pairs with gravity or most image pairs are with | ||
| // gravity, then just run the 3dof version | ||
| bool status = false; | ||
| status = status || grav_pairs == 0; |
There was a problem hiding this comment.
first status is always false so the or condition is superfluous.
|
|
||
| class RotationAverager { | ||
| public: | ||
| RotationAverager(const RotationAveragerOptions& options) |
There was a problem hiding this comment.
| RotationAverager(const RotationAveragerOptions& options) | |
| explicit RotationAverager(const RotationAveragerOptions& options) |
Co-authored-by: Johannes Schönberger <joschonb@microsoft.com>
Co-authored-by: Johannes Schönberger <joschonb@microsoft.com>
* Fix conversion of colmap pose prior * d * restore the pose prior after rotation averaging * f * f * f * gravity refinement tested * add the stratified rotation averager and CLI * f * d * d * add timer * add options for gravity refinement * merge gravity_io to pose_io * add readme for the rotation averager * f * Update glomap/math/gravity.cc Co-authored-by: Johannes Schönberger <joschonb@microsoft.com> * f * Update glomap/controllers/rotation_averager.cc Co-authored-by: Johannes Schönberger <joschonb@microsoft.com> * Update glomap/controllers/rotation_averager.cc Co-authored-by: Johannes Schönberger <joschonb@microsoft.com> * change rotation averager from class to struct * d * d * add weighting and corresponding IO. Tested * change the writing of relative pose to be sorted * unit test for rotation averager * inject noise to avoid local minima for error-free case * f * add more points in the unit test --------- Co-authored-by: Johannes Schönberger <joschonb@microsoft.com>
No description provided.