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

Method FromFile

src/colmap/geometry/sim3.cc:50–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50Sim3d Sim3d::FromFile(const std::filesystem::path& path) {
51 std::ifstream file(path);
52 THROW_CHECK(file.good()) << path;
53 file.imbue(std::locale::classic());
54 Sim3d t;
55 THROW_CHECK(file >> t.scale() >> t.rotation().w() >> t.rotation().x() >>
56 t.rotation().y() >> t.rotation().z() >> t.translation().x() >>
57 t.translation().y() >> t.translation().z());
58 return t;
59}
60
61std::ostream& operator<<(std::ostream& stream, const Sim3d& tform) {
62 const static Eigen::IOFormat kVecFmt(

Callers

nothing calls this directly

Calls 2

rotationMethod · 0.45
translationMethod · 0.45

Tested by

no test coverage detected