Function mosaic::room_frame::average#

Function Documentation#

Mat4 mosaic::room_frame::average(const std::vector<Mat4> &samples)#

Quaternion-mean rotation (sign-aligned to the first sample, then renormalized) + arithmetic-mean translation.

Only a valid approximation of the “correct” rotation average (chordal/Karcher mean) when the input rotations are already close together — true here because samples are repeated shots of the same static rig. Returns identity() for an empty input, echoes the single sample unchanged for a size-1 input.

See also

docs/math/room_calibration.rst for the full derivation.