MCPcopy Create free account
hub / github.com/colmap/colmap / FromMatrix

Method FromMatrix

src/colmap/geometry/sim3.h:83–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 }
82
83 static inline Sim3d FromMatrix(const Eigen::Matrix3x4d& matrix) {
84 Sim3d t;
85 t.scale() = matrix.col(0).norm();
86 t.rotation() =
87 Eigen::Quaterniond(matrix.leftCols<3>() / t.scale()).normalized();
88 t.translation() = matrix.rightCols<1>();
89 return t;
90 }
91
92 // Read from or write to text file without loss of precision.
93 void ToFile(const std::filesystem::path& path) const;

Callers

nothing calls this directly

Calls 2

rotationMethod · 0.45
translationMethod · 0.45

Tested by

no test coverage detected